Commit 475be81d authored by Tetsui Ohkubo's avatar Tetsui Ohkubo Committed by Commit Bot

Vertical alignment support for UnifiedSystemTray.

This CL adds right/left shelf alignment support for UnifiedSystemTray.

TEST=PanelLayoutManagerTest.TouchHitTestPanel
(--enable-features=SystemTrayUnified)
BUG=847104

Change-Id: I69d2755dd18d40508c3183ae08a75eef732dcce8
Reviewed-on: https://chromium-review.googlesource.com/1086900Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564907}
parent 2189f6dc
......@@ -164,6 +164,7 @@ UnifiedSystemTray::UnifiedSystemTray(Shelf* shelf)
tray_container()->AddChildView(time_item);
SetInkDropMode(InkDropMode::ON);
set_separator_visibility(false);
SetVisible(true);
}
......@@ -223,6 +224,14 @@ void UnifiedSystemTray::ClickedOutsideBubble() {
CloseBubble();
}
void UnifiedSystemTray::UpdateAfterShelfAlignmentChange() {
TrayBackgroundView::UpdateAfterShelfAlignmentChange();
time_view_->UpdateClockLayout(
shelf()->IsHorizontalAlignment()
? tray::TimeView::ClockLayout::HORIZONTAL_CLOCK
: tray::TimeView::ClockLayout::VERTICAL_CLOCK);
}
void UnifiedSystemTray::ShowBubbleInternal(bool show_by_click) {
// Hide volume/brightness slider popup.
slider_bubble_controller_->CloseBubble();
......
......@@ -54,6 +54,7 @@ class ASH_EXPORT UnifiedSystemTray : public TrayBackgroundView {
base::string16 GetAccessibleNameForTray() override;
void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override;
void ClickedOutsideBubble() override;
void UpdateAfterShelfAlignmentChange() override;
UnifiedSystemTrayModel* model() { return model_.get(); }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment