Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: ui/message_center/views/notifier_settings_view.cc

Issue 2964983002: Set the background color of notification settings explicitly (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/message_center/views/notifier_settings_view.h" 5 #include "ui/message_center/views/notifier_settings_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 views::style::CONTEXT_DIALOG_TITLE); 433 views::style::CONTEXT_DIALOG_TITLE);
434 title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 434 title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
435 title_label_->SetMultiLine(true); 435 title_label_->SetMultiLine(true);
436 title_label_->SetBorder( 436 title_label_->SetBorder(
437 views::CreateEmptyBorder(kComputedTitleTopMargin, kTitleMargin, 437 views::CreateEmptyBorder(kComputedTitleTopMargin, kTitleMargin,
438 kComputedTitleBottomMargin, kTitleMargin)); 438 kComputedTitleBottomMargin, kTitleMargin));
439 439
440 AddChildView(title_label_); 440 AddChildView(title_label_);
441 441
442 scroller_ = new views::ScrollView(); 442 scroller_ = new views::ScrollView();
443 scroller_->SetBackgroundColor(kMessageCenterBackgroundColor);
443 scroller_->SetVerticalScrollBar(new views::OverlayScrollBar(false)); 444 scroller_->SetVerticalScrollBar(new views::OverlayScrollBar(false));
444 scroller_->SetHorizontalScrollBar(new views::OverlayScrollBar(true)); 445 scroller_->SetHorizontalScrollBar(new views::OverlayScrollBar(true));
445 AddChildView(scroller_); 446 AddChildView(scroller_);
446 447
447 std::vector<std::unique_ptr<Notifier>> notifiers; 448 std::vector<std::unique_ptr<Notifier>> notifiers;
448 if (provider_) 449 if (provider_)
449 provider_->GetNotifierList(&notifiers); 450 provider_->GetNotifierList(&notifiers);
450 451
451 UpdateContentsView(std::move(notifiers)); 452 UpdateContentsView(std::move(notifiers));
452 } 453 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 provider_->SetNotifierEnabled((*iter)->notifier(), (*iter)->checked()); 630 provider_->SetNotifierEnabled((*iter)->notifier(), (*iter)->checked());
630 } 631 }
631 632
632 void NotifierSettingsView::OnPerformAction(views::Combobox* combobox) { 633 void NotifierSettingsView::OnPerformAction(views::Combobox* combobox) {
633 provider_->SwitchToNotifierGroup(combobox->selected_index()); 634 provider_->SwitchToNotifierGroup(combobox->selected_index());
634 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); 635 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent());
635 center_view->OnSettingsChanged(); 636 center_view->OnSettingsChanged();
636 } 637 }
637 638
638 } // namespace message_center 639 } // namespace message_center
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698