[gnome-shell/wip/fmuellner/ease-actors: 1050/1052] environment: Support slow down factor when easing



commit 4d090c81108de49ffaf0ea41c5b8a02bd3c23c78
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Jun 5 00:13:14 2014 +0200

    environment: Support slow down factor when easing
    
    Being able to slow down animations is a helpful debugging tool; to not
    lose it when starting to use Clutter's implicit animations, monkey-patch
    the appropriate methods to support our global slow down factor.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22

 js/ui/environment.js | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/js/ui/environment.js b/js/ui/environment.js
index 55d10198e..a1ffd60e5 100644
--- a/js/ui/environment.js
+++ b/js/ui/environment.js
@@ -94,6 +94,15 @@ function init() {
                                             column_spacing: 'spacing-columns' });
     _patchLayoutClass(Clutter.BoxLayout, { spacing: 'spacing' });
 
+    let origSetEasingDuration = Clutter.Actor.prototype.set_easing_duration;
+    Clutter.Actor.prototype.set_easing_duration = function(msecs) {
+        origSetEasingDuration.call(this, adjustAnimationTime(msecs));
+    };
+    let origSetEasingDelay = Clutter.Actor.prototype.set_easing_delay;
+    Clutter.Actor.prototype.set_easing_delay = function(msecs) {
+        origSetEasingDelay.call(this, adjustAnimationTime(msecs));
+    };
+
     Clutter.Actor.prototype.toString = function() {
         return St.describe_actor(this);
     };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]