| 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..38bfd8edcf7738e0b9058a38e10fa1e9aba6aaa5 100644
|
| --- a/ash/common/system/overview/overview_button_tray.cc
|
| +++ b/ash/common/system/overview/overview_button_tray.cc
|
| @@ -33,6 +33,10 @@ const int kHorizontalShelfVerticalPadding = 4;
|
| const int kVerticalShelfHorizontalPadding = 2;
|
| const int kVerticalShelfVerticalPadding = 5;
|
|
|
| +// Padding used to adjust the user-visible size of overview tray's dark
|
| +// background.
|
| +const int kBackgroundTrayPadding = 3;
|
| +
|
| } // namespace
|
|
|
| namespace ash {
|
| @@ -40,6 +44,7 @@ namespace ash {
|
| OverviewButtonTray::OverviewButtonTray(WmShelf* wm_shelf)
|
| : TrayBackgroundView(wm_shelf), icon_(nullptr) {
|
| SetContentsBackground();
|
| + SetOverviewTrayBorder();
|
|
|
| icon_ = new views::ImageView();
|
| if (MaterialDesignController::IsShelfMaterial()) {
|
| @@ -110,7 +115,10 @@ void OverviewButtonTray::SetShelfAlignment(ShelfAlignment alignment) {
|
| return;
|
|
|
| TrayBackgroundView::SetShelfAlignment(alignment);
|
| - SetIconBorderForShelfAlignment();
|
| + if (!ash::MaterialDesignController::IsShelfMaterial()) {
|
| + SetOverviewTrayBorder();
|
| + SetIconBorderForShelfAlignment();
|
| + }
|
| }
|
|
|
| void OverviewButtonTray::SetIconBorderForShelfAlignment() {
|
| @@ -123,17 +131,22 @@ void OverviewButtonTray::SetIconBorderForShelfAlignment() {
|
| gfx::Insets(vertical_padding, horizontal_padding)));
|
| } else {
|
| if (IsHorizontalAlignment(shelf_alignment())) {
|
| - icon_->SetBorder(views::Border::CreateEmptyBorder(
|
| - kHorizontalShelfVerticalPadding, kHorizontalShelfHorizontalPadding,
|
| - kHorizontalShelfVerticalPadding, kHorizontalShelfHorizontalPadding));
|
| + icon_->SetBorder(views::Border::CreateEmptyBorder(gfx::Insets(
|
| + kHorizontalShelfVerticalPadding, kHorizontalShelfHorizontalPadding)));
|
| } else {
|
| - icon_->SetBorder(views::Border::CreateEmptyBorder(
|
| - kVerticalShelfVerticalPadding, kVerticalShelfHorizontalPadding,
|
| - kVerticalShelfVerticalPadding, kVerticalShelfHorizontalPadding));
|
| + icon_->SetBorder(views::Border::CreateEmptyBorder(gfx::Insets(
|
| + kVerticalShelfVerticalPadding, kVerticalShelfHorizontalPadding)));
|
| }
|
| }
|
| }
|
|
|
| +void OverviewButtonTray::SetOverviewTrayBorder() {
|
| + if (!ash::MaterialDesignController::IsShelfMaterial()) {
|
| + tray_container()->SetBorder(
|
| + views::Border::CreateEmptyBorder(gfx::Insets(kBackgroundTrayPadding)));
|
| + }
|
| +}
|
| +
|
| void OverviewButtonTray::UpdateIconVisibility() {
|
| // The visibility of the OverviewButtonTray has diverge from
|
| // WindowSelectorController::CanSelect. The visibility of the button should
|
| @@ -142,7 +155,6 @@ void OverviewButtonTray::UpdateIconVisibility() {
|
| WmShell* shell = WmShell::Get();
|
| SessionStateDelegate* session_state_delegate =
|
| shell->GetSessionStateDelegate();
|
| -
|
| SetVisible(
|
| shell->maximize_mode_controller()->IsMaximizeModeWindowManagerEnabled() &&
|
| session_state_delegate->IsActiveUserSessionStarted() &&
|
|
|