diff options
Diffstat (limited to 'ash/system/tray/tray_views.cc')
-rw-r--r-- | ash/system/tray/tray_views.cc | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/ash/system/tray/tray_views.cc b/ash/system/tray/tray_views.cc index 6ce432f..baee946 100644 --- a/ash/system/tray/tray_views.cc +++ b/ash/system/tray/tray_views.cc @@ -368,6 +368,9 @@ void TrayPopupHeaderButton::StateChanged() { SchedulePaint(); } +//////////////////////////////////////////////////////////////////////////////// +// SpecialPopupRow + SpecialPopupRow::SpecialPopupRow() : content_(NULL), button_container_(NULL) { @@ -421,6 +424,13 @@ void SpecialPopupRow::AddButton(TrayPopupHeaderButton* button) { button_container_->AddChildView(button); } +gfx::Size SpecialPopupRow::GetPreferredSize() { + const int kFixedHeight = 55; + gfx::Size size = views::View::GetPreferredSize(); + size.set_height(kFixedHeight); + return size; +} + void SpecialPopupRow::Layout() { views::View::Layout(); gfx::Rect content_bounds = GetContentsBounds(); @@ -442,17 +452,6 @@ void SpecialPopupRow::Layout() { content_->SetBoundsRect(bounds); } -void SetupLabelForTray(views::Label* label) { - label->SetFont( - label->font().DeriveFont(2, gfx::Font::BOLD)); - label->SetAutoColorReadabilityEnabled(false); - label->SetEnabledColor(SK_ColorWHITE); - label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255)); - label->SetShadowColors(SkColorSetARGB(64, 0, 0, 0), - SkColorSetARGB(64, 0, 0, 0)); - label->SetShadowOffset(0, 1); -} - //////////////////////////////////////////////////////////////////////////////// // TrayNotificationView @@ -496,5 +495,16 @@ void TrayNotificationView::ButtonPressed(views::Button* sender, OnClose(); } +void SetupLabelForTray(views::Label* label) { + label->SetFont( + label->font().DeriveFont(2, gfx::Font::BOLD)); + label->SetAutoColorReadabilityEnabled(false); + label->SetEnabledColor(SK_ColorWHITE); + label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255)); + label->SetShadowColors(SkColorSetARGB(64, 0, 0, 0), + SkColorSetARGB(64, 0, 0, 0)); + label->SetShadowOffset(0, 1); +} + } // namespace internal } // namespace ash |