OLD | NEW |
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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 if (provider_) | 423 if (provider_) |
424 provider_->AddObserver(this); | 424 provider_->AddObserver(this); |
425 | 425 |
426 SetFocusBehavior(FocusBehavior::ALWAYS); | 426 SetFocusBehavior(FocusBehavior::ALWAYS); |
427 set_background( | 427 set_background( |
428 views::Background::CreateSolidBackground(kMessageCenterBackgroundColor)); | 428 views::Background::CreateSolidBackground(kMessageCenterBackgroundColor)); |
429 SetPaintToLayer(); | 429 SetPaintToLayer(); |
430 | 430 |
431 title_label_ = new views::Label( | 431 title_label_ = new views::Label( |
432 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL), | 432 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL), |
433 ui::ResourceBundle::GetSharedInstance().GetFontList( | 433 views::style::CONTEXT_DIALOG_TITLE); |
434 ui::ResourceBundle::MediumFont)); | |
435 title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 434 title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
436 title_label_->SetMultiLine(true); | 435 title_label_->SetMultiLine(true); |
437 title_label_->SetBorder( | 436 title_label_->SetBorder( |
438 views::CreateEmptyBorder(kComputedTitleTopMargin, kTitleMargin, | 437 views::CreateEmptyBorder(kComputedTitleTopMargin, kTitleMargin, |
439 kComputedTitleBottomMargin, kTitleMargin)); | 438 kComputedTitleBottomMargin, kTitleMargin)); |
440 | 439 |
441 AddChildView(title_label_); | 440 AddChildView(title_label_); |
442 | 441 |
443 scroller_ = new views::ScrollView(); | 442 scroller_ = new views::ScrollView(); |
444 scroller_->SetVerticalScrollBar(new views::OverlayScrollBar(false)); | 443 scroller_->SetVerticalScrollBar(new views::OverlayScrollBar(false)); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 provider_->SetNotifierEnabled((*iter)->notifier(), (*iter)->checked()); | 627 provider_->SetNotifierEnabled((*iter)->notifier(), (*iter)->checked()); |
629 } | 628 } |
630 | 629 |
631 void NotifierSettingsView::OnPerformAction(views::Combobox* combobox) { | 630 void NotifierSettingsView::OnPerformAction(views::Combobox* combobox) { |
632 provider_->SwitchToNotifierGroup(combobox->selected_index()); | 631 provider_->SwitchToNotifierGroup(combobox->selected_index()); |
633 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); | 632 MessageCenterView* center_view = static_cast<MessageCenterView*>(parent()); |
634 center_view->OnSettingsChanged(); | 633 center_view->OnSettingsChanged(); |
635 } | 634 } |
636 | 635 |
637 } // namespace message_center | 636 } // namespace message_center |
OLD | NEW |