Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/message_center_button_bar.h" | 5 #include "ui/message_center/views/message_center_button_bar.h" |
| 6 | 6 |
| 7 #include "grit/ui_resources.h" | 7 #include "grit/ui_resources.h" |
| 8 #include "grit/ui_strings.h" | 8 #include "grit/ui_strings.h" |
| 9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
| 10 #include "ui/base/models/simple_menu_model.h" | 10 #include "ui/base/models/simple_menu_model.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 IDR_NOTIFICATION_ARROW_HOVER, | 114 IDR_NOTIFICATION_ARROW_HOVER, |
| 115 IDR_NOTIFICATION_ARROW_PRESSED, | 115 IDR_NOTIFICATION_ARROW_PRESSED, |
| 116 0); | 116 0); |
| 117 title_arrow_->set_size(gfx::Size(kChevronWidth, kButtonSize)); | 117 title_arrow_->set_size(gfx::Size(kChevronWidth, kButtonSize)); |
| 118 | 118 |
| 119 // Keyboardists can use the gear button to switch modes. | 119 // Keyboardists can use the gear button to switch modes. |
| 120 title_arrow_->SetFocusable(false); | 120 title_arrow_->SetFocusable(false); |
| 121 AddChildView(title_arrow_); | 121 AddChildView(title_arrow_); |
| 122 | 122 |
| 123 notification_label_ = new views::Label( | 123 notification_label_ = new views::Label( |
| 124 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_FOOTER_TITLE)); | 124 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_FOOTER_TITLE)); |
|
dewittj
2014/06/06 21:32:36
This line needs to reflect the new resource so we
Pete Williamson
2014/06/09 18:30:16
Done.
| |
| 125 notification_label_->SetAutoColorReadabilityEnabled(false); | 125 notification_label_->SetAutoColorReadabilityEnabled(false); |
| 126 notification_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 126 notification_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 127 notification_label_->SetEnabledColor(kRegularTextColor); | 127 notification_label_->SetEnabledColor(kRegularTextColor); |
| 128 AddChildView(notification_label_); | 128 AddChildView(notification_label_); |
| 129 | 129 |
| 130 button_container_ = new views::View; | 130 button_container_ = new views::View; |
| 131 button_container_->SetLayoutManager( | 131 button_container_->SetLayoutManager( |
| 132 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0)); | 132 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0)); |
| 133 quiet_mode_button_ = new NotificationCenterButton( | 133 quiet_mode_button_ = new NotificationCenterButton( |
| 134 this, | 134 this, |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 quiet_mode_button_->SetToggled(message_center()->IsQuietMode()); | 292 quiet_mode_button_->SetToggled(message_center()->IsQuietMode()); |
| 293 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 293 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 294 } else if (sender == close_bubble_button_) { | 294 } else if (sender == close_bubble_button_) { |
| 295 message_center_view()->tray()->HideMessageCenterBubble(); | 295 message_center_view()->tray()->HideMessageCenterBubble(); |
| 296 #endif | 296 #endif |
| 297 } else { | 297 } else { |
| 298 NOTREACHED(); | 298 NOTREACHED(); |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 | 301 |
| 302 void MessageCenterButtonBar::SetNotificationTitle( | |
| 303 const base::string16& new_title) { | |
| 304 notification_label_->SetText(new_title); | |
| 305 ViewVisibilityChanged(); | |
| 306 Layout(); | |
| 307 } | |
| 308 | |
| 302 } // namespace message_center | 309 } // namespace message_center |
| OLD | NEW |