[gnome-shell] Make opening and closing LookingGlass slow-down independent



commit 392999bc43b95ed22889370693586a61a425d701
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Tue Nov 9 14:37:32 2010 -0500

    Make opening and closing LookingGlass slow-down independent
    
    Waiting for LookingGlass to close after calling St.set_slow_down_factor()
    is annoying so divide the time for opening and closing by the slow-down
    factor.

 js/ui/lookingGlass.js |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js
index e6bc65b..4ef2057 100644
--- a/js/ui/lookingGlass.js
+++ b/js/ui/lookingGlass.js
@@ -940,7 +940,9 @@ LookingGlass.prototype = {
 
         global.stage.set_key_focus(this._entry);
 
-        Tweener.addTween(this.actor, { time: 0.5,
+        // We inverse compensate for the slow-down so you can change the factor
+        // through LookingGlass without long waits.
+        Tweener.addTween(this.actor, { time: 0.5 / St.get_slow_down_factor(),
                                        transition: 'easeOutQuad',
                                        y: this._targetY
                                      });
@@ -967,7 +969,7 @@ LookingGlass.prototype = {
 
         Main.popModal(this.actor);
 
-        Tweener.addTween(this.actor, { time: 0.5,
+        Tweener.addTween(this.actor, { time: 0.5 / St.get_slow_down_factor(),
                                        transition: 'easeOutQuad',
                                        y: this._hiddenY,
                                        onComplete: Lang.bind(this, function () {



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