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 3e26c5069993d2872ef9ae0d0f4602002b223bb3..4b11c766d22e8a1e6f5f19827c1872f9d5cb6a36 100644 |
--- a/ash/common/system/tray/tray_background_view.cc |
+++ b/ash/common/system/tray/tray_background_view.cc |
@@ -175,6 +175,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(); |
@@ -208,7 +213,9 @@ void TrayBackgroundView::TrayContainer::UpdateLayout() { |
// dark background. |
const int padding = 3; |
SetBorder( |
- views::Border::CreateEmptyBorder(padding, padding, padding, padding)); |
+ views::Border::CreateEmptyBorder(gfx::Insets(padding) + margin_)); |
+ } else { |
+ SetBorder(views::Border::CreateEmptyBorder(margin_)); |
} |
views::BoxLayout* layout = new views::BoxLayout(orientation, 0, 0, 0); |