Commit d9a3c865 authored by Toni Barzic's avatar Toni Barzic Committed by Commit Bot

Use correct fade animation when entering overview from home

And add some delay before stating opacity animation.

BUG=1020735

Change-Id: I5fabd3923c55ecf969727b2887e32dd938873b41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1895080Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712347}
parent 5a934f16
...@@ -457,9 +457,14 @@ void OverviewItem::SetBounds(const gfx::RectF& target_bounds, ...@@ -457,9 +457,14 @@ void OverviewItem::SetBounds(const gfx::RectF& target_bounds,
overview_session_->enter_exit_overview_type() == overview_session_->enter_exit_overview_type() ==
OverviewSession::EnterExitOverviewType::kSlideInEnter; OverviewSession::EnterExitOverviewType::kSlideInEnter;
if (!slide_in) { if (!slide_in) {
FadeInWidgetAndMaybeSlideOnEnter( // If entering from home launcher, use the home specific (fade)
item_widget_.get(), // animation.
OVERVIEW_ANIMATION_ENTER_OVERVIEW_MODE_FADE_IN, OverviewAnimationType fade_animation =
animation_type == OVERVIEW_ANIMATION_ENTER_FROM_HOME_LAUNCHER
? animation_type
: OVERVIEW_ANIMATION_ENTER_OVERVIEW_MODE_FADE_IN;
FadeInWidgetAndMaybeSlideOnEnter(item_widget_.get(), fade_animation,
/*slide=*/false, /*slide=*/false,
/*observe=*/true); /*observe=*/true);
} }
......
...@@ -158,10 +158,14 @@ ScopedOverviewAnimationSettings::ScopedOverviewAnimationSettings( ...@@ -158,10 +158,14 @@ ScopedOverviewAnimationSettings::ScopedOverviewAnimationSettings(
animation_settings_->SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN); animation_settings_->SetTweenType(gfx::Tween::FAST_OUT_SLOW_IN);
animation_settings_->SetPreemptionStrategy( animation_settings_->SetPreemptionStrategy(
ui::LayerAnimator::ENQUEUE_NEW_ANIMATION); ui::LayerAnimator::ENQUEUE_NEW_ANIMATION);
// Add animation delay when entering from home launcher using slide // Add animation delay when entering from home launcher.
// animation (which is the case if homerview gesture is not enabled, in // Delay transform only when using slide animation (which is used
// which case overview will fade in without sliding). // if kHomerviewGesture is not enabled), as otherwise the overview item
if (!features::IsHomerviewGestureEnabled()) { // will only fade in.
if (features::IsHomerviewGestureEnabled()) {
animator->SchedulePauseForProperties(
kFromHomeLauncherDelay, ui::LayerAnimationElement::OPACITY);
} else {
animator->SchedulePauseForProperties( animator->SchedulePauseForProperties(
kFromHomeLauncherDelay, ui::LayerAnimationElement::OPACITY | kFromHomeLauncherDelay, ui::LayerAnimationElement::OPACITY |
ui::LayerAnimationElement::TRANSFORM); ui::LayerAnimationElement::TRANSFORM);
......
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