Commit 74250ee7 authored by David Black's avatar David Black Committed by Chromium LUCI CQ

Update bounce in animation to use tweens from spec.

Tweens used in bounce animation were not quite to spec.

Bug: 1166014
Change-Id: Iecaadb3ff5e7d00bf911cef0563302e462700dad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2625891Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: David Black <dmblack@google.com>
Cr-Commit-Position: refs/heads/master@{#843156}
parent 0a1f2fff
...@@ -430,6 +430,7 @@ void TrayBackgroundView::BounceInAnimation() { ...@@ -430,6 +430,7 @@ void TrayBackgroundView::BounceInAnimation() {
std::unique_ptr<ui::LayerAnimationElement> scale_and_move_up = std::unique_ptr<ui::LayerAnimationElement> scale_and_move_up =
ui::LayerAnimationElement::CreateInterpolatedTransformElement( ui::LayerAnimationElement::CreateInterpolatedTransformElement(
std::move(scale_about_pivot), kAnimationDurationForBounceElement); std::move(scale_about_pivot), kAnimationDurationForBounceElement);
scale_and_move_up->set_tween_type(gfx::Tween::FAST_OUT_SLOW_IN_3);
std::unique_ptr<ui::LayerAnimationElement> move_down = std::unique_ptr<ui::LayerAnimationElement> move_down =
ui::LayerAnimationElement::CreateInterpolatedTransformElement( ui::LayerAnimationElement::CreateInterpolatedTransformElement(
...@@ -437,13 +438,14 @@ void TrayBackgroundView::BounceInAnimation() { ...@@ -437,13 +438,14 @@ void TrayBackgroundView::BounceInAnimation() {
gfx::PointF(0, -kAnimationBounceDistance), gfx::PointF(0, -kAnimationBounceDistance),
gfx::PointF(0, kAnimationBounceDistance)), gfx::PointF(0, kAnimationBounceDistance)),
kAnimationDurationForBounceElement); kAnimationDurationForBounceElement);
move_down->set_tween_type(gfx::Tween::EASE_IN); move_down->set_tween_type(gfx::Tween::EASE_OUT_4);
std::unique_ptr<ui::LayerAnimationElement> move_up = std::unique_ptr<ui::LayerAnimationElement> move_up =
ui::LayerAnimationElement::CreateInterpolatedTransformElement( ui::LayerAnimationElement::CreateInterpolatedTransformElement(
std::make_unique<ui::InterpolatedTranslation>( std::make_unique<ui::InterpolatedTranslation>(
gfx::PointF(0, kAnimationBounceDistance), gfx::PointF(0, 0)), gfx::PointF(0, kAnimationBounceDistance), gfx::PointF(0, 0)),
kAnimationDurationForBounceElement); kAnimationDurationForBounceElement);
move_up->set_tween_type(gfx::Tween::FAST_OUT_SLOW_IN_3);
std::unique_ptr<ui::LayerAnimationSequence> sequence = std::unique_ptr<ui::LayerAnimationSequence> sequence =
std::make_unique<ui::LayerAnimationSequence>(); std::make_unique<ui::LayerAnimationSequence>();
......
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