Chromium Code Reviews| Index: ash/system/tray/tray_popup_header_button.cc |
| diff --git a/ash/system/tray/tray_popup_header_button.cc b/ash/system/tray/tray_popup_header_button.cc |
| index 84c04fbb8a3f4dc3bc27ad010eca8ab93cf87cb4..10ebf629c6b45d8056adaaa4e99d0aaa001dbb42 100644 |
| --- a/ash/system/tray/tray_popup_header_button.cc |
| +++ b/ash/system/tray/tray_popup_header_button.cc |
| @@ -8,6 +8,7 @@ |
| #include "ash/system/tray/tray_constants.h" |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/gfx/canvas.h" |
|
Mr4D (OOO till 08-26)
2014/12/11 19:50:10
I think you can get rid of this now.
jonross
2014/12/11 21:41:41
Done.
|
| +#include "ui/views/background.h" |
| #include "ui/views/painter.h" |
| namespace ash { |
| @@ -53,15 +54,12 @@ gfx::Size TrayPopupHeaderButton::GetPreferredSize() const { |
| return gfx::Size(ash::kTrayPopupItemHeight, ash::kTrayPopupItemHeight); |
| } |
| -void TrayPopupHeaderButton::OnPaintBorder(gfx::Canvas* canvas) { |
| - // Just the left border. |
| - const int kBorderHeight = 25; |
| - int padding = (height() - kBorderHeight) / 2; |
| - canvas->FillRect(gfx::Rect(0, padding, 1, height() - padding * 2), |
| - ash::kBorderDarkColor); |
| -} |
| - |
| void TrayPopupHeaderButton::StateChanged() { |
| + if (state() == STATE_HOVERED || state() == STATE_PRESSED) |
|
Mr4D (OOO till 08-26)
2014/12/11 19:50:10
Since more lines, please use {}
jonross
2014/12/11 21:41:41
Foiled by git cl format!
Done
|
| + set_background(views::Background::CreateSolidBackground( |
| + kTrayPopupHoverBackgroundColor)); |
| + else |
| + set_background(nullptr); |
| SchedulePaint(); |
| } |