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.
This commit is contained in:
Owen W. Taylor 2010-11-09 14:37:32 -05:00
parent 013f07278b
commit 392999bc43

View File

@ -940,7 +940,9 @@ LookingGlass.prototype = {
global.stage.set_key_focus(this._entry); 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', transition: 'easeOutQuad',
y: this._targetY y: this._targetY
}); });
@ -967,7 +969,7 @@ LookingGlass.prototype = {
Main.popModal(this.actor); 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', transition: 'easeOutQuad',
y: this._hiddenY, y: this._hiddenY,
onComplete: Lang.bind(this, function () { onComplete: Lang.bind(this, function () {