| Index: ash/common/system/tray/system_tray.cc
|
| diff --git a/ash/common/system/tray/system_tray.cc b/ash/common/system/tray/system_tray.cc
|
| index 75a6b093c7e8bcad0b1bfa15c65578d7ce865ab2..143d0499cbe3b036b2702723e2ea0e744bec9092 100644
|
| --- a/ash/common/system/tray/system_tray.cc
|
| +++ b/ash/common/system/tray/system_tray.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "ash/common/ash_switches.h"
|
| #include "ash/common/login_status.h"
|
| +#include "ash/common/material_design/material_design_controller.h"
|
| #include "ash/common/session/session_state_delegate.h"
|
| #include "ash/common/shelf/wm_shelf.h"
|
| #include "ash/common/shelf/wm_shelf_util.h"
|
| @@ -73,6 +74,9 @@ namespace ash {
|
| // The minimum width of the system tray menu width.
|
| const int kMinimumSystemTrayMenuWidth = 300;
|
|
|
| +// Padding used to adjust the user-visible size of status tray dark background.
|
| +const int kBackgroundTrayPadding = 3;
|
| +
|
| // Class to initialize and manage the SystemTrayBubble and TrayBubbleWrapper
|
| // instances for a bubble.
|
|
|
| @@ -155,6 +159,7 @@ void SystemTray::InitializeTrayItems(
|
| DCHECK(web_notification_tray);
|
| web_notification_tray_ = web_notification_tray;
|
| TrayBackgroundView::Initialize();
|
| + AdjustStatusTrayBackground();
|
| CreateItems(delegate);
|
| }
|
|
|
| @@ -627,6 +632,9 @@ void SystemTray::SetShelfAlignment(ShelfAlignment alignment) {
|
| if (alignment == shelf_alignment())
|
| return;
|
| TrayBackgroundView::SetShelfAlignment(alignment);
|
| + if (!ash::MaterialDesignController::IsShelfMaterial())
|
| + AdjustStatusTrayBackground();
|
| +
|
| UpdateAfterShelfAlignmentChange(alignment);
|
| // Destroy any existing bubble so that it is rebuilt correctly.
|
| CloseSystemBubbleAndDeactivateSystemTray();
|
| @@ -794,4 +802,11 @@ void SystemTray::RecordSystemMenuMetrics() {
|
| }
|
| }
|
|
|
| +void SystemTray::AdjustStatusTrayBackground() {
|
| + if (!ash::MaterialDesignController::IsShelfMaterial()) {
|
| + tray_container()->SetBorder(
|
| + views::Border::CreateEmptyBorder(gfx::Insets(kBackgroundTrayPadding)));
|
| + }
|
| +}
|
| +
|
| } // namespace ash
|
|
|