From 392999bc43b95ed22889370693586a61a425d701 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Tue, 9 Nov 2010 14:37:32 -0500 Subject: [PATCH] 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 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index e6bc65b33..4ef2057dc 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 () {