[gnome-shell/gbsneto/new-lock-screen: 15/22] authPrompt: Iconize the cancel button



commit 5b6deff9776fd16bd86cffeac17aa22c03f7ef5b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Oct 12 21:12:45 2019 -0300

    authPrompt: Iconize the cancel button
    
    Replace the "Cancel" label in the cancel button
    by an arrow icon, and adjust the theme to make
    it circular.

 data/theme/gnome-shell-sass/_common.scss |  9 +++++++++
 js/gdm/authPrompt.js                     | 12 +++++++-----
 2 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
index 11bf3ef856..3bcd35e95b 100644
--- a/data/theme/gnome-shell-sass/_common.scss
+++ b/data/theme/gnome-shell-sass/_common.scss
@@ -1986,6 +1986,15 @@ StScrollBar {
       }
     }
   }
+
+  .cancel-button {
+    padding: 0;
+    border-radius: 16px;
+    width: 32px;
+    height: 32px;
+
+         StIcon { icon-size: 16px; }
+  }
 }
 
   .login-dialog-logo-bin { padding: 24px 0px; }
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 338751605c..0db40564d8 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -112,11 +112,13 @@ var AuthPrompt = class {
         });
         this.actor.add_child(mainBox);
 
-        this.cancelButton = new St.Button({ style_class: 'modal-dialog-button button',
-                                            button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
-                                            reactive: true,
-                                            can_focus: true,
-                                            label: _("Cancel") });
+        this.cancelButton = new St.Button({
+            style_class: 'modal-dialog-button button cancel-button',
+            button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
+            reactive: true,
+            can_focus: true,
+            child: new St.Icon({ icon_name: 'go-previous-symbolic' }),
+        });
         this.cancelButton.connect('clicked', () => this.cancel());
         mainBox.add_child(this.cancelButton);
 


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