Commit fb4d55e1 authored by Tetsui Ohkubo's avatar Tetsui Ohkubo Committed by Commit Bot

Expand system tray when detailed view is shown.

In UnifiedSystemTray, a11y feature pod button can be shown in collapsed
state. In that case, when the button is clicked, the a11y detailed view
was shown without expanding the system tray. See the screenshot.

Screenshot of the bug: http://screen/wWb2MxGwxMM

TEST=manual
BUG=856035

Change-Id: Ib345450a07f258156ac82a4f62584c058ec9b35d
Reviewed-on: https://chromium-review.googlesource.com/1116627Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571036}
parent b4514da6
......@@ -328,6 +328,9 @@ void UnifiedSystemTrayController::AddFeaturePodItem(
void UnifiedSystemTrayController::ShowDetailedView(
std::unique_ptr<DetailedViewController> controller) {
animation_->Reset(1.0);
UpdateExpandedAmount();
unified_view_->SetDetailedView(controller->CreateView());
unified_view_->SaveFeaturePodFocus();
detailed_view_controller_ = std::move(controller);
......
......@@ -194,6 +194,7 @@ void UnifiedSystemTrayView::ResetDetailedView() {
detailed_view_container_->RemoveAllChildViews(true /* delete_children */);
detailed_view_container_->SetVisible(false);
system_tray_container_->SetVisible(true);
sliders_container_->UpdateOpacity();
PreferredSizeChanged();
Layout();
}
......
......@@ -29,14 +29,14 @@ class UnifiedSlidersContainerView : public views::View {
// Otherwise, it shows intermediate state.
void SetExpandedAmount(double expanded_amount);
// Update opacity of each child slider views based on |expanded_amount_|.
void UpdateOpacity();
// views::View:
void Layout() override;
gfx::Size CalculatePreferredSize() const override;
private:
// Update opacity of each child slider views based on |expanded_amount_|.
void UpdateOpacity();
double expanded_amount_;
DISALLOW_COPY_AND_ASSIGN(UnifiedSlidersContainerView);
......
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