Commit 393e60bf authored by Matthew Mourgos's avatar Matthew Mourgos Committed by Commit Bot

CrOS Shelf: Show back button opacity animation.

Without this change the back button just instantly appears/disappears.

Bug: 1031363
Change-Id: I731bfb62637215f18ea90c5c34b2b51d7be4c787
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1952423Reviewed-by: default avatarManu Cornet <manucornet@chromium.org>
Commit-Queue: Matthew Mourgos <mmourgos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722585}
parent e96029c3
...@@ -336,6 +336,8 @@ void ShelfNavigationWidget::UpdateLayout() { ...@@ -336,6 +336,8 @@ void ShelfNavigationWidget::UpdateLayout() {
ui::ScopedLayerAnimationSettings settings( ui::ScopedLayerAnimationSettings settings(
GetBackButton()->layer()->GetAnimator()); GetBackButton()->layer()->GetAnimator());
settings.SetTransitionDuration(animation_duration); settings.SetTransitionDuration(animation_duration);
settings.SetPreemptionStrategy(
ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
settings.AddObserver(this); settings.AddObserver(this);
GetBackButton()->layer()->SetOpacity(is_back_button_shown ? 1 : 0); GetBackButton()->layer()->SetOpacity(is_back_button_shown ? 1 : 0);
......
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