[gnome-shell] ScreenShield: animate going from the unlock dialog to the lock screen
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] ScreenShield: animate going from the unlock dialog to the lock screen
- Date: Fri, 14 Sep 2012 15:14:21 +0000 (UTC)
commit 107f5de58e0b5f973e00326284b92207976995c3
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Aug 14 01:43:59 2012 +0200
ScreenShield: animate going from the unlock dialog to the lock screen
If the user presses esc in the dialog, tween the lock screen from
the top instead of showing it immediately.
https://bugzilla.gnome.org/show_bug.cgi?id=681143
js/ui/screenShield.js | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 21e0567..8caa9cc 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -644,14 +644,14 @@ const ScreenShield = new Lang.Class({
this._dialog.destroy();
this._dialog = null;
- this._resetLockScreen(false);
+ this._resetLockScreen(true, false);
},
_onUnlockSucceded: function() {
this._tweenUnlocked();
},
- _resetLockScreen: function(animate) {
+ _resetLockScreen: function(animateLockScreen, animateLockDialog) {
this._ensureLockScreen();
this._lockDialogGroup.scale_x = 1;
this._lockDialogGroup.scale_y = 1;
@@ -659,7 +659,7 @@ const ScreenShield = new Lang.Class({
this._lockScreenGroup.show();
this._lockScreenState = MessageTray.State.SHOWING;
- if (animate) {
+ if (animateLockScreen) {
this._lockScreenGroup.y = -global.screen_height;
Tweener.removeTweens(this._lockScreenGroup);
Tweener.addTween(this._lockScreenGroup,
@@ -671,7 +671,12 @@ const ScreenShield = new Lang.Class({
},
onCompleteScope: this
});
+ } else {
+ this._lockScreenGroup.fixed_position_set = false;
+ this._lockScreenShown();
+ }
+ if (animateLockDialog) {
this._lockDialogGroup.opacity = 0;
Tweener.removeTweens(this._lockDialogGroup);
Tweener.addTween(this._lockDialogGroup,
@@ -680,7 +685,6 @@ const ScreenShield = new Lang.Class({
transition: 'easeOutQuad' });
} else {
this._lockDialogGroup.opacity = 255;
- this._lockScreenShown();
}
this._lockScreenGroup.grab_key_focus();
@@ -812,7 +816,7 @@ const ScreenShield = new Lang.Class({
Main.sessionMode.pushMode('unlock-dialog');
}
- this._resetLockScreen(animate);
+ this._resetLockScreen(animate, animate);
this._isActive = true;
this.emit('lock-status-changed');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]