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 2192034abaa42599a181c45050136a256754490b..740dacacf67ab4645da8adc0b450788c3cfdf91f 100644 |
--- a/ash/common/system/tray/tray_background_view.cc |
+++ b/ash/common/system/tray/tray_background_view.cc |
@@ -251,8 +251,9 @@ TrayBackgroundView::~TrayBackgroundView() { |
StopObservingImplicitAnimations(); |
} |
-void TrayBackgroundView::Initialize() { |
+void TrayBackgroundView::Initialize(const gfx::Insets& insets) { |
GetWidget()->AddObserver(widget_observer_.get()); |
+ SetTrayBorder(insets); |
} |
// static |
@@ -375,11 +376,18 @@ void TrayBackgroundView::SetContentsBackground() { |
tray_container_->set_background(background_); |
} |
-void TrayBackgroundView::SetShelfAlignment(ShelfAlignment alignment) { |
+void TrayBackgroundView::SetShelfAlignment(ShelfAlignment alignment, |
+ const gfx::Insets& insets) { |
shelf_alignment_ = alignment; |
+ SetTrayBorder(insets); |
James Cook
2016/06/29 19:34:14
This should pull the insets from somewhere, rather
|
tray_container_->SetAlignment(alignment); |
} |
+void TrayBackgroundView::SetTrayBorder(const gfx::Insets& insets) { |
+ SetBorder(views::Border::CreateEmptyBorder(insets.top(), insets.left(), |
+ insets.bottom(), insets.right())); |
+} |
+ |
void TrayBackgroundView::OnImplicitAnimationsCompleted() { |
// If there is another animation in the queue, the reverse animation was |
// triggered before the completion of animating to invisible. Do not turn off |