| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/system/tray/tray_views.h" | 5 #include "ash/system/tray/tray_views.h" |
| 6 | 6 |
| 7 #include "ash/system/tray/tray_constants.h" | 7 #include "ash/system/tray/tray_constants.h" |
| 8 #include "grit/ash_strings.h" | 8 #include "grit/ash_strings.h" |
| 9 #include "grit/ui_resources_standard.h" | 9 #include "grit/ui_resources_standard.h" |
| 10 #include "grit/ui_resources_standard.h" | 10 #include "grit/ui_resources_standard.h" |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 void TrayPopupHeaderButton::StateChanged() { | 424 void TrayPopupHeaderButton::StateChanged() { |
| 425 SchedulePaint(); | 425 SchedulePaint(); |
| 426 } | 426 } |
| 427 | 427 |
| 428 //////////////////////////////////////////////////////////////////////////////// | 428 //////////////////////////////////////////////////////////////////////////////// |
| 429 // SpecialPopupRow | 429 // SpecialPopupRow |
| 430 | 430 |
| 431 SpecialPopupRow::SpecialPopupRow() | 431 SpecialPopupRow::SpecialPopupRow() |
| 432 : content_(NULL), | 432 : content_(NULL), |
| 433 button_container_(NULL) { | 433 button_container_(NULL) { |
| 434 set_background(views::Background::CreateBackgroundPainter(true, | 434 views::Background* background = views::Background::CreateBackgroundPainter( |
| 435 views::Painter::CreateVerticalGradient( | 435 true, views::Painter::CreateVerticalGradient(kHeaderBackgroundColorLight, |
| 436 kHeaderBackgroundColorLight, | 436 kHeaderBackgroundColorDark)); |
| 437 kHeaderBackgroundColorDark))); | 437 background->SetNativeControlColor(kHeaderBackgroundColorDark); |
| 438 set_background(background); |
| 438 set_border(new SpecialPopupRowBorder); | 439 set_border(new SpecialPopupRowBorder); |
| 439 SetLayoutManager( | 440 SetLayoutManager( |
| 440 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0)); | 441 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0)); |
| 441 } | 442 } |
| 442 | 443 |
| 443 SpecialPopupRow::~SpecialPopupRow() { | 444 SpecialPopupRow::~SpecialPopupRow() { |
| 444 } | 445 } |
| 445 | 446 |
| 446 void SpecialPopupRow::SetTextLabel(int string_id, ViewClickListener* listener) { | 447 void SpecialPopupRow::SetTextLabel(int string_id, ViewClickListener* listener) { |
| 447 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 448 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 label->SetAutoColorReadabilityEnabled(false); | 607 label->SetAutoColorReadabilityEnabled(false); |
| 607 label->SetEnabledColor(SK_ColorWHITE); | 608 label->SetEnabledColor(SK_ColorWHITE); |
| 608 label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255)); | 609 label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255)); |
| 609 label->SetShadowColors(SkColorSetARGB(64, 0, 0, 0), | 610 label->SetShadowColors(SkColorSetARGB(64, 0, 0, 0), |
| 610 SkColorSetARGB(64, 0, 0, 0)); | 611 SkColorSetARGB(64, 0, 0, 0)); |
| 611 label->SetShadowOffset(0, 1); | 612 label->SetShadowOffset(0, 1); |
| 612 } | 613 } |
| 613 | 614 |
| 614 } // namespace internal | 615 } // namespace internal |
| 615 } // namespace ash | 616 } // namespace ash |
| OLD | NEW |