| Index: ash/wm/overview/scoped_overview_animation_settings_aura.cc
|
| diff --git a/ash/wm/overview/scoped_overview_animation_settings_aura.cc b/ash/wm/overview/scoped_overview_animation_settings_aura.cc
|
| index 994d85497de04427c9b147aac6ea099c4584bc38..346b85fa4e57eaf2c2641286630ad4a1375f8a71 100644
|
| --- a/ash/wm/overview/scoped_overview_animation_settings_aura.cc
|
| +++ b/ash/wm/overview/scoped_overview_animation_settings_aura.cc
|
| @@ -15,7 +15,7 @@ namespace ash {
|
| namespace {
|
|
|
| // The time duration for transformation animations.
|
| -const int kTransitionMilliseconds = 200;
|
| +const int kTransitionMilliseconds = 300;
|
|
|
| // The time duration for fading out when closing an item. Only used with
|
| // Material Design.
|
| @@ -26,13 +26,15 @@ const int kCloseFadeOutMillisecondsMd = 50;
|
| const int kCloseScaleMillisecondsMd = 100;
|
|
|
| // The time duration for widgets to fade in.
|
| -const int kFadeInMilliseconds = 80;
|
| +const int kFadeInMilliseconds = 160;
|
|
|
| base::TimeDelta GetAnimationDuration(OverviewAnimationType animation_type) {
|
| switch (animation_type) {
|
| case OVERVIEW_ANIMATION_NONE:
|
| return base::TimeDelta();
|
| case OVERVIEW_ANIMATION_ENTER_OVERVIEW_MODE_FADE_IN:
|
| + return base::TimeDelta::FromMilliseconds(kTransitionMilliseconds);
|
| + case OVERVIEW_ANIMATION_FADE_IN_HEADER:
|
| return base::TimeDelta::FromMilliseconds(kFadeInMilliseconds);
|
| case OVERVIEW_ANIMATION_LAY_OUT_SELECTOR_ITEMS:
|
| case OVERVIEW_ANIMATION_RESTORE_WINDOW:
|
| @@ -53,27 +55,35 @@ ScopedOverviewAnimationSettingsAura::ScopedOverviewAnimationSettingsAura(
|
| OverviewAnimationType animation_type,
|
| aura::Window* window)
|
| : animation_settings_(window->layer()->GetAnimator()) {
|
| + const bool material = ash::MaterialDesignController::IsOverviewMaterial();
|
| switch (animation_type) {
|
| case OVERVIEW_ANIMATION_NONE:
|
| animation_settings_.SetPreemptionStrategy(
|
| ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS);
|
| break;
|
| case OVERVIEW_ANIMATION_ENTER_OVERVIEW_MODE_FADE_IN:
|
| - window->layer()->GetAnimator()->SchedulePauseForProperties(
|
| - GetAnimationDuration(
|
| - OverviewAnimationType::OVERVIEW_ANIMATION_LAY_OUT_SELECTOR_ITEMS),
|
| - ui::LayerAnimationElement::OPACITY);
|
| + if (!material) {
|
| + window->layer()->GetAnimator()->SchedulePauseForProperties(
|
| + GetAnimationDuration(OverviewAnimationType::
|
| + OVERVIEW_ANIMATION_LAY_OUT_SELECTOR_ITEMS),
|
| + ui::LayerAnimationElement::OPACITY);
|
| + }
|
| animation_settings_.SetPreemptionStrategy(
|
| ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS);
|
| + if (material)
|
| + animation_settings_.SetTweenType(gfx::Tween::EASE_OUT);
|
| + break;
|
| + case OVERVIEW_ANIMATION_FADE_IN_HEADER:
|
| + animation_settings_.SetPreemptionStrategy(
|
| + ui::LayerAnimator::ENQUEUE_NEW_ANIMATION);
|
| + animation_settings_.SetTweenType(gfx::Tween::EASE_OUT);
|
| break;
|
| case OVERVIEW_ANIMATION_LAY_OUT_SELECTOR_ITEMS:
|
| case OVERVIEW_ANIMATION_RESTORE_WINDOW:
|
| animation_settings_.SetPreemptionStrategy(
|
| ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
|
| - animation_settings_.SetTweenType(
|
| - ash::MaterialDesignController::IsOverviewMaterial()
|
| - ? gfx::Tween::EASE_IN_2
|
| - : gfx::Tween::FAST_OUT_SLOW_IN);
|
| + animation_settings_.SetTweenType(material ? gfx::Tween::EASE_IN_OUT
|
| + : gfx::Tween::FAST_OUT_SLOW_IN);
|
| break;
|
| case OVERVIEW_ANIMATION_CLOSING_SELECTOR_ITEM:
|
| case OVERVIEW_ANIMATION_CLOSE_SELECTOR_ITEM:
|
|
|