Chromium Code Reviews| Index: ash/common/system/overview/overview_button_tray.cc |
| diff --git a/ash/common/system/overview/overview_button_tray.cc b/ash/common/system/overview/overview_button_tray.cc |
| index e3508b474c4a26553b89336f0d3ed517b8783ff8..801aaf411c6013998409d6bec2ed2e45f43eed9b 100644 |
| --- a/ash/common/system/overview/overview_button_tray.cc |
| +++ b/ash/common/system/overview/overview_button_tray.cc |
| @@ -33,6 +33,9 @@ const int kHorizontalShelfVerticalPadding = 4; |
| const int kVerticalShelfHorizontalPadding = 2; |
| const int kVerticalShelfVerticalPadding = 5; |
| +// Padding used to adjust the user-visible size of overview dark background. |
|
varkha
2016/07/14 21:34:47
nit: s/overview/overview tray
yiyix
2016/07/26 20:27:30
Done.
|
| +const int kBackgroundTrayPadding = 3; |
| + |
| } // namespace |
| namespace ash { |
| @@ -40,6 +43,7 @@ namespace ash { |
| OverviewButtonTray::OverviewButtonTray(WmShelf* wm_shelf) |
| : TrayBackgroundView(wm_shelf), icon_(nullptr) { |
| SetContentsBackground(); |
| + AdjustOverviewBackground(); |
| icon_ = new views::ImageView(); |
| if (MaterialDesignController::IsShelfMaterial()) { |
| @@ -110,6 +114,7 @@ void OverviewButtonTray::SetShelfAlignment(ShelfAlignment alignment) { |
| return; |
| TrayBackgroundView::SetShelfAlignment(alignment); |
| + AdjustOverviewBackground(); |
|
varkha
2016/07/14 21:34:47
Do you need to call those 2 methods that create bo
yiyix
2016/07/26 20:27:30
true, I will add a condition. thanks
|
| SetIconBorderForShelfAlignment(); |
| } |
| @@ -134,6 +139,14 @@ void OverviewButtonTray::SetIconBorderForShelfAlignment() { |
| } |
| } |
| +void OverviewButtonTray::AdjustOverviewBackground() { |
| + if (!ash::MaterialDesignController::IsShelfMaterial()) { |
| + tray_container()->SetBorder(views::Border::CreateEmptyBorder( |
|
varkha
2016/07/14 21:34:47
nit: simpler to use gfx::Insets(kBackgroundTrayPad
yiyix
2016/07/26 20:27:30
Done.
|
| + kBackgroundTrayPadding, kBackgroundTrayPadding, kBackgroundTrayPadding, |
| + kBackgroundTrayPadding)); |
| + } |
| +} |
| + |
| void OverviewButtonTray::UpdateIconVisibility() { |
| // The visibility of the OverviewButtonTray has diverge from |
| // WindowSelectorController::CanSelect. The visibility of the button should |