[gnome-shell-extensions/wip/rstrode/heads-up-display: 31/62] window-list: Improve workspace label styling




commit d88ab8f847856bfbe3eb9045ed3a762ec7e9eb64
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Jun 5 05:11:34 2019 +0200

    window-list: Improve workspace label styling
    
    The border currently looks off - it extends all the way vertically
    and leaves zero spacing to the label horizontally. Fix both issues
    by setting appropriate padding/margins.
    
    https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/70

 extensions/window-list/stylesheet.css        |  8 +++-----
 extensions/window-list/workspaceIndicator.js | 13 ++++++++-----
 2 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/extensions/window-list/stylesheet.css b/extensions/window-list/stylesheet.css
index 91383ab..bab8f76 100644
--- a/extensions/window-list/stylesheet.css
+++ b/extensions/window-list/stylesheet.css
@@ -85,13 +85,11 @@
   height: 24px;
 }
 
-.window-list-workspace-indicator {
-  padding: 3px;
-}
-
-.window-list-workspace-indicator > StWidget {
+.window-list-workspace-indicator .status-label-bin {
   background-color: rgba(200, 200, 200, .3);
   border: 1px solid #cccccc;
+  padding: 0 3px;
+  margin: 3px 0;
 }
 
 .notification {
diff --git a/extensions/window-list/workspaceIndicator.js b/extensions/window-list/workspaceIndicator.js
index 0d3ba48..ace4e25 100644
--- a/extensions/window-list/workspaceIndicator.js
+++ b/extensions/window-list/workspaceIndicator.js
@@ -26,12 +26,15 @@ var WorkspaceIndicator = GObject.registerClass({
         let workspaceManager = global.workspace_manager;
 
         this._currentWorkspace = workspaceManager.get_active_workspace_index();
-        this._statusLabel = new St.Label({
-            text: this._getStatusText(),
-            x_align: Clutter.ActorAlign.CENTER,
-            y_align: Clutter.ActorAlign.CENTER
+        this._statusLabel = new St.Label({ text: this._getStatusText() });
+
+        this._statusBin = new St.Bin({
+            style_class: 'status-label-bin',
+            x_expand: true,
+            y_expand: true,
+            child: this._statusLabel
         });
-        container.add_actor(this._statusLabel);
+        container.add_actor(this._statusBin);
 
         this._workspacesItems = [];
 


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