[gnome-shell/gbsneto/multi-user-button: 7/7] authPrompt: Hide cancel button on unlock screen



commit 5cad5c20e9fc2bdfe39b49221485b33c55387790
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Feb 14 13:14:55 2020 -0300

    authPrompt: Hide cancel button on unlock screen
    
    As per the latest design review, hide the cancel button
    on the unlock dialog.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1006

 js/gdm/authPrompt.js | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 2f98989078..42638bee5f 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -81,6 +81,8 @@ var AuthPrompt = GObject.registerClass({
         });
         this.add_child(this._userWell);
 
+        this._hasCancelButton = this._mode === AuthPromptStatus.UNLOCK_OR_LOG_IN;
+
         this._initEntryRow();
 
         this._capsLockWarningLabel = new ShellEntry.CapsLockWarning({
@@ -123,13 +125,16 @@ var AuthPrompt = GObject.registerClass({
         this.cancelButton = new St.Button({
             style_class: 'modal-dialog-button button cancel-button',
             button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
-            reactive: true,
+            reactive: this._hasCancelButton,
             can_focus: true,
             x_align: Clutter.ActorAlign.START,
             y_align: Clutter.ActorAlign.CENTER,
             child: new St.Icon({ icon_name: 'go-previous-symbolic' }),
         });
-        this.cancelButton.connect('clicked', () => this.cancel());
+        if (this._hasCancelButton)
+            this.cancelButton.connect('clicked', () => this.cancel());
+        else
+            this.cancelButton.opacity = 0;
         this._mainBox.add_child(this.cancelButton);
 
         let entryParams = {
@@ -433,7 +438,7 @@ var AuthPrompt = GObject.registerClass({
     reset() {
         let oldStatus = this.verificationStatus;
         this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
-        this.cancelButton.reactive = true;
+        this.cancelButton.reactive = this._hasCancelButton;
         this._preemptiveAnswer = null;
 
         if (this._userVerifier)


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