[gnome-shell/gbsneto/new-lock-screen-part2: 50/56] unlockDialog: Add user name label below clock



commit 0474c73d23c0aa52e30c320a5b62269df7452fbd
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Nov 29 18:46:10 2019 -0300

    unlockDialog: Add user name label below clock
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872

 data/theme/gnome-shell-sass/widgets/_screen-shield.scss |  4 ++++
 js/ui/unlockDialog.js                                   | 15 ++++++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/data/theme/gnome-shell-sass/widgets/_screen-shield.scss 
b/data/theme/gnome-shell-sass/widgets/_screen-shield.scss
index 2ad914c266..241e3de302 100644
--- a/data/theme/gnome-shell-sass/widgets/_screen-shield.scss
+++ b/data/theme/gnome-shell-sass/widgets/_screen-shield.scss
@@ -18,6 +18,10 @@
   font-weight: normal;
 }
 
+.unlock-dialog-user-name {
+  padding: 12px 0px;
+}
+
 .unlock-dialog-notifications-container {
   spacing: 6px;
   width: 30em;
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 418dcf6ba8..155fcd14b7 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -421,7 +421,20 @@ var UnlockDialog = GObject.registerClass({
         this._promptBox = new St.BoxLayout({ vertical: true });
         stack.add_child(this._promptBox);
 
-        this._clock = new Clock();
+        // Clock
+        this._clock = new St.BoxLayout({ vertical: true });
+
+        let clock = new Clock();
+        this._clock.add_child(clock);
+
+        let nameLabel = new St.Label({
+            style_class: 'unlock-dialog-user-name',
+            text: this._user.get_real_name(),
+            x_expand: true,
+            x_align: Clutter.ActorAlign.CENTER,
+        });
+        this._clock.add_child(nameLabel);
+
         stack.add_child(this._clock);
         this._showClock();
 


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