[gnome-shell/gbsneto/new-lock-screen: 21/23] unlockDialog: Adjust notification style



commit 67602702f9db58b77748c4218133966279644576
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Oct 7 19:18:55 2019 -0300

    unlockDialog: Adjust notification style
    
    I think I can flip the development table and
    become a designer now -- what else is needed
    beyond figuring out spacing anyway?!

 data/theme/gnome-shell-sass/_common.scss |  9 ++++----
 js/ui/unlockDialog.js                    | 36 ++++++++++++++++----------------
 2 files changed, 23 insertions(+), 22 deletions(-)
---
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
index 7c2027020f..29e04ff2d0 100644
--- a/data/theme/gnome-shell-sass/_common.scss
+++ b/data/theme/gnome-shell-sass/_common.scss
@@ -2071,19 +2071,19 @@ $_screenshield_shadow: 0px 0px 6px rgba(0, 0, 0, 0.726);
 
 .screen-shield-clock {
   color: white;
-  font-weight: 300;
   text-align: center;
   padding-bottom: 2.5em;
 }
 
 .screen-shield-clock-time {
-  font-size: 72pt;
+  font-size: 56pt;
+  font-weight: 200;
   padding-bottom: 24px;
   font-feature-settings: "tnum";
 }
 
 .screen-shield-clock-date { 
-  font-size: 24pt;
+  font-size: 16pt;
   font-weight: bold;
 }
 
@@ -2091,6 +2091,7 @@ $_screenshield_shadow: 0px 0px 6px rgba(0, 0, 0, 0.726);
   spacing: 6px;
   width: 30em;
   background-color: transparent;
+  padding: 24px 0;
   max-height: 500px;
   .summary-notification-stack-scrollview {
     padding-top: 0;
@@ -2099,7 +2100,7 @@ $_screenshield_shadow: 0px 0px 6px rgba(0, 0, 0, 0.726);
 
   .notification,
   .screen-shield-notification-source {
-    padding: 12px 6px;
+    padding: 12px;
     border: 1px solid $osd_outer_borders_color;
     background-color: transparentize($osd_bg_color,0.5);
     color: $osd_fg_color;
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 392418b107..46d37085bb 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -14,7 +14,7 @@ const AuthPrompt = imports.gdm.authPrompt;
 // The timeout before going back automatically to the lock screen (in seconds)
 const IDLE_TIMEOUT = 2 * 60;
 
-var SUMMARY_ICON_SIZE = 48;
+var SUMMARY_ICON_SIZE = 24;
 
 var Clock = class {
     constructor() {
@@ -95,28 +95,28 @@ var NotificationsBox = class {
         this.actor.visible = this._notificationBox.visible;
     }
 
-    _makeNotificationCountText(count, isChat) {
-        if (isChat)
-            return ngettext("%d new message", "%d new messages", count).format(count);
-        else
-            return ngettext("%d new notification", "%d new notifications", count).format(count);
-    }
-
     _makeNotificationSource(source, box) {
         let sourceActor = new MessageTray.SourceActor(source, SUMMARY_ICON_SIZE);
         box.add(sourceActor, { y_fill: true });
 
-        let textBox = new St.BoxLayout({ vertical: true });
-        box.add(textBox, { y_fill: false, y_align: St.Align.START });
-
-        let title = new St.Label({ text: source.title,
-                                   style_class: 'screen-shield-notification-label' });
-        textBox.add(title);
+        let title = new St.Label({
+            text: source.title,
+            style_class: 'screen-shield-notification-label',
+            x_expand: true,
+            y_align: Clutter.ActorAlign.START,
+            y_expand: true,
+            y_align: Clutter.ActorAlign.CENTER,
+        });
+        box.add_child(title);
 
         let count = source.unseenCount;
-        let countLabel = new St.Label({ text: this._makeNotificationCountText(count, source.isChat),
-                                        style_class: 'screen-shield-notification-count-text' });
-        textBox.add(countLabel);
+        let countLabel = new St.Label({
+            text: '%d'.format(count),
+            style_class: 'screen-shield-notification-count-text',
+            y_expand: true,
+            y_align: Clutter.ActorAlign.CENTER,
+        });
+        box.add_child(countLabel);
 
         box.visible = count != 0;
         return [title, countLabel];
@@ -258,7 +258,7 @@ var NotificationsBox = class {
             this._showSource(source, obj, obj.sourceBox);
         } else {
             let count = source.unseenCount;
-            obj.countLabel.text = this._makeNotificationCountText(count, source.isChat);
+            obj.countLabel.text = '%d'.format(count);
         }
 
         obj.sourceBox.visible = obj.visible && (source.unseenCount > 0);


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