[gnome-shell/wip/fmuellner/ease-actors: 6/6] layout: Split ripple animation
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/ease-actors: 6/6] layout: Split ripple animation
- Date: Thu, 8 Feb 2018 20:09:14 +0000 (UTC)
commit 5ddf21b4c3fd27dbce4d2ba65eb959955ce79a58
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Jun 10 05:55:10 2017 +0200
layout: Split ripple animation
Similar to the previous patch, splitting the existing tween into two
allows us to use implicit animations.
js/ui/layout.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 2f1894775..e705a3860 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -1191,12 +1191,10 @@ var HotCorner = new Lang.Class({
// We draw a ripple by using a source image and animating it scaling
// outwards and fading away. We want the ripples to move linearly
// or it looks unrealistic, but if the opacity of the ripple goes
- // linearly to zero it fades away too quickly, so we use Tweener's
- // 'onUpdate' to give a non-linear curve to the fade-away and make
+ // linearly to zero it fades away too quickly, so we use a separate
+ // tween to give a non-linear curve to the fade-away and make
// it more visible in the middle section.
- ripple._opacity = startOpacity;
-
if (ripple.get_text_direction() == Clutter.TextDirection.RTL)
ripple.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
@@ -1207,13 +1205,15 @@ var HotCorner = new Lang.Class({
ripple.x = this._x;
ripple.y = this._y;
- Tweener.addTween(ripple, { _opacity: 0,
- scale_x: finalScale,
+ Tweener.addTween(ripple, { opacity: 0,
+ delay: delay,
+ time: time,
+ transition: 'easeInQuad' });
+ Tweener.addTween(ripple, { scale_x: finalScale,
scale_y: finalScale,
delay: delay,
time: time,
transition: 'linear',
- onUpdate: function() { ripple.opacity = 255 * Math.sqrt(ripple._opacity);
},
onComplete: function() { ripple.visible = false; } });
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]