Commit 85896467 authored by Peter Mayo's avatar Peter Mayo Committed by Commit Bot

Revert "ash: Make power button menu animation faster."

This reverts commit afe2cfbc.

Reason for revert: compile fail on linux-chromeos-dbg

Original change's description:
> ash: Make power button menu animation faster.
> 
> Bug: 826063
> Change-Id: I1930da3effd7952d2019e480048778075a0bcd58
> Reviewed-on: https://chromium-review.googlesource.com/981686
> Commit-Queue: Min Chen <minch@chromium.org>
> Reviewed-by: Dan Erat <derat@chromium.org>
> Reviewed-by: Qiang Xu <warx@google.com>
> Cr-Commit-Position: refs/heads/master@{#546960}

TBR=derat@chromium.org,minch@chromium.org,warx@google.com

Change-Id: I1e1e7937ce2ff174c37f96ef50370d464bdfe86a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 826063
Reviewed-on: https://chromium-review.googlesource.com/986724Reviewed-by: default avatarPeter Mayo <petermayo@chromium.org>
Commit-Queue: Peter Mayo <petermayo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546980}
parent 29e3d401
...@@ -72,8 +72,8 @@ class PowerButtonMenuScreenView::PowerButtonMenuBackgroundView ...@@ -72,8 +72,8 @@ class PowerButtonMenuScreenView::PowerButtonMenuBackgroundView
animation.AddObserver(this); animation.AddObserver(this);
animation.SetTweenType(show ? gfx::Tween::EASE_IN_2 animation.SetTweenType(show ? gfx::Tween::EASE_IN_2
: gfx::Tween::FAST_OUT_LINEAR_IN); : gfx::Tween::FAST_OUT_LINEAR_IN);
animation.SetTransitionDuration( animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
PowerButtonMenuView::kMenuAnimationDuration); PowerButtonMenuView::kAnimationTimeoutMs));
layer()->SetOpacity(show ? kPowerButtonMenuOpacity : 0.f); layer()->SetOpacity(show ? kPowerButtonMenuOpacity : 0.f);
} }
......
...@@ -55,7 +55,8 @@ void PowerButtonMenuView::ScheduleShowHideAnimation(bool show) { ...@@ -55,7 +55,8 @@ void PowerButtonMenuView::ScheduleShowHideAnimation(bool show) {
animation.AddObserver(this); animation.AddObserver(this);
animation.SetTweenType(show ? gfx::Tween::EASE_IN animation.SetTweenType(show ? gfx::Tween::EASE_IN
: gfx::Tween::FAST_OUT_LINEAR_IN); : gfx::Tween::FAST_OUT_LINEAR_IN);
animation.SetTransitionDuration(kMenuAnimationDuration); animation.SetTransitionDuration(
base::TimeDelta::FromMilliseconds(kAnimationTimeoutMs));
layer()->SetOpacity(show ? 1.0f : 0.f); layer()->SetOpacity(show ? 1.0f : 0.f);
......
...@@ -21,9 +21,8 @@ class ASH_EXPORT PowerButtonMenuView : public views::View, ...@@ -21,9 +21,8 @@ class ASH_EXPORT PowerButtonMenuView : public views::View,
public views::ButtonListener, public views::ButtonListener,
public ui::ImplicitAnimationObserver { public ui::ImplicitAnimationObserver {
public: public:
// The duration of showing or dismissing power button menu animation. // The duration of the animation to show or hide the power button menu view.
static constexpr base::TimeDelta kMenuAnimationDuration = static constexpr int kAnimationTimeoutMs = 500;
base::TimeDelta::FromMilliseconds(250);
// Distance of the menu animation transform. // Distance of the menu animation transform.
static constexpr int kMenuViewTransformDistanceDp = 16; static constexpr int kMenuViewTransformDistanceDp = 16;
......
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