[gnome-shell/gbsneto/new-lock-screen-part2: 13/22] screenShield: Lift the unlock dialog



commit f713ae96f382793b3790a536c02c0fc513b8fcd0
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Nov 29 12:24:17 2019 -0300

    screenShield: Lift the unlock dialog
    
    Instead of scaling it, lift the unlock dialog when unlocking,
    and vice-versa.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872

 js/ui/screenShield.js | 46 ++++++++++++++++------------------------------
 1 file changed, 16 insertions(+), 30 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 8110655ffc..28f81da6d9 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -92,20 +92,6 @@ var ScreenShield = class {
 
         this._screenSaverDBus = new ShellDBus.ScreenSaverDBus(this);
 
-        this._smartcardManager = SmartcardManager.getSmartcardManager();
-        this._smartcardManager.connect('smartcard-inserted',
-                                       (manager, token) => {
-                                           if (this._isLocked && token.UsedToLogin)
-                                               this._liftShield();
-                                       });
-
-        this._oVirtCredentialsManager = OVirt.getOVirtCredentialsManager();
-        this._oVirtCredentialsManager.connect('user-authenticated',
-                                              () => {
-                                                  if (this._isLocked)
-                                                      this._liftShield();
-                                              });
-
         this._loginManager = LoginManager.getLoginManager();
         this._loginManager.connect('prepare-for-sleep',
                                    this._prepareForSleep.bind(this));
@@ -167,15 +153,6 @@ var ScreenShield = class {
         this._syncInhibitor();
     }
 
-    _liftShield() {
-        if (this._isLocked) {
-            if (this._ensureUnlockDialog(true /* allowCancel */))
-                this._hideLockScreen(true /* animate */);
-        } else {
-            this.deactivate(true /* animate */);
-        }
-    }
-
     _maybeCancelDialog() {
         if (!this._dialog)
             return;
@@ -230,7 +207,6 @@ var ScreenShield = class {
             GLib.unichar_isgraph(unichar))
             this._dialog.addCharacter(unichar);
 
-        this._liftShield();
         return Clutter.EVENT_STOP;
     }
 
@@ -406,6 +382,12 @@ var ScreenShield = class {
                 translation_y: -h,
                 duration,
                 mode: Clutter.AnimationMode.EASE_IN_QUAD,
+            });
+
+            this._lockDialogGroup.ease({
+                translation_y: -h,
+                duration,
+                mode: Clutter.AnimationMode.EASE_OUT_QUAD,
                 onComplete: () => this._hideLockScreenComplete(),
             });
         } else {
@@ -457,9 +439,6 @@ var ScreenShield = class {
         if (this._lockScreenState != MessageTray.State.HIDDEN)
             return;
 
-        this._lockDialogGroup.scale_x = 1;
-        this._lockDialogGroup.scale_y = 1;
-
         this._lockScreenGroup.show();
         this._lockScreenState = MessageTray.State.SHOWING;
 
@@ -472,6 +451,14 @@ var ScreenShield = class {
                 translation_y: 0,
                 duration: MANUAL_FADE_TIME,
                 mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+            });
+
+            this._lockDialogGroup.translation_y = -global.screen_height;
+            this._lockDialogGroup.remove_all_transitions();
+            this._lockDialogGroup.ease({
+                translation_y: 0,
+                duration: Overview.ANIMATION_TIME,
+                mode: Clutter.AnimationMode.EASE_OUT_QUAD,
                 onComplete: () => {
                     this._lockScreenShown({ fadeToBlack, animateFade: true });
                 },
@@ -576,9 +563,8 @@ var ScreenShield = class {
         }
 
         this._lockDialogGroup.ease({
-            scale_x: 0,
-            scale_y: 0,
-            duration: animate ? Overview.ANIMATION_TIME : 0,
+            translation_y: -global.screen_height,
+            duration: Overview.ANIMATION_TIME,
             mode: Clutter.AnimationMode.EASE_OUT_QUAD,
             onComplete: () => this._completeDeactivate(),
         });


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