| Index: ash/common/system/tray/tray_background_view.cc
|
| diff --git a/ash/common/system/tray/tray_background_view.cc b/ash/common/system/tray/tray_background_view.cc
|
| index 4d209a56ee1e9af7bda33876a4415957c03a3709..e6393764d72dda2bf251ca1f66e52c3359dffb96 100644
|
| --- a/ash/common/system/tray/tray_background_view.cc
|
| +++ b/ash/common/system/tray/tray_background_view.cc
|
| @@ -174,6 +174,11 @@ void TrayBackgroundView::TrayContainer::SetAlignment(ShelfAlignment alignment) {
|
| UpdateLayout();
|
| }
|
|
|
| +void TrayBackgroundView::TrayContainer::SetMargin(const gfx::Insets& margin) {
|
| + margin_ = margin;
|
| + UpdateLayout();
|
| +}
|
| +
|
| gfx::Size TrayBackgroundView::TrayContainer::GetPreferredSize() const {
|
| if (size_.IsEmpty())
|
| return views::View::GetPreferredSize();
|
| @@ -206,8 +211,9 @@ void TrayBackgroundView::TrayContainer::UpdateLayout() {
|
| // Additional padding used to adjust the user-visible size of status tray
|
| // dark background.
|
| const int padding = 3;
|
| - SetBorder(
|
| - views::Border::CreateEmptyBorder(padding, padding, padding, padding));
|
| + SetBorder(views::Border::CreateEmptyBorder(gfx::Insets(padding) + margin_));
|
| + } else {
|
| + SetBorder(views::Border::CreateEmptyBorder(margin_));
|
| }
|
|
|
| views::BoxLayout* layout = new views::BoxLayout(orientation, 0, 0, 0);
|
|
|