Chromium Code Reviews| 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 97ddaa066cacca7e6ddd2ba2a5d8969860945141..865c922ea60e94d3693382b7b68339c079e7a796 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" |
| @@ -72,6 +73,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; |
|
varkha
2016/07/14 21:34:47
Should this live in a common place?
yiyix
2016/07/26 20:27:31
I was thinking that the overview button padding co
|
| + |
| // Class to initialize and manage the SystemTrayBubble and TrayBubbleWrapper |
| // instances for a bubble. |
| @@ -153,6 +157,7 @@ void SystemTray::InitializeTrayItems( |
| DCHECK(web_notification_tray); |
| web_notification_tray_ = web_notification_tray; |
| TrayBackgroundView::Initialize(); |
| + AdjustStatusTrayBackground(); |
| CreateItems(delegate); |
| } |
| @@ -607,7 +612,9 @@ base::string16 SystemTray::GetAccessibleTimeString( |
| void SystemTray::SetShelfAlignment(ShelfAlignment alignment) { |
| if (alignment == shelf_alignment()) |
| return; |
| + |
|
varkha
2016/07/14 21:34:47
nit: no ws.
yiyix
2016/07/26 20:27:31
On 2016/07/14 21:34:47, varkha wrote:
> nit: no ws
|
| TrayBackgroundView::SetShelfAlignment(alignment); |
| + AdjustStatusTrayBackground(); |
|
varkha
2016/07/14 21:34:47
Same questions / comments as in overview_button_tr
yiyix
2016/07/26 20:27:31
Done.
|
| UpdateAfterShelfAlignmentChange(alignment); |
| // Destroy any existing bubble so that it is rebuilt correctly. |
| CloseSystemBubbleAndDeactivateSystemTray(); |
| @@ -773,4 +780,12 @@ void SystemTray::RecordSystemMenuMetrics() { |
| } |
| } |
| +void SystemTray::AdjustStatusTrayBackground() { |
| + if (!ash::MaterialDesignController::IsShelfMaterial()) { |
| + tray_container()->SetBorder(views::Border::CreateEmptyBorder( |
| + kBackgroundTrayPadding, kBackgroundTrayPadding, kBackgroundTrayPadding, |
| + kBackgroundTrayPadding)); |
| + } |
| +} |
| + |
| } // namespace ash |