From a5f347ba10408a30d1a2ffeff020f3a63c2784f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 5 Jun 2019 05:11:34 +0200 Subject: [PATCH] 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 91383ab6..bab8f763 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 1f2e1c18..598c5165 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 = [];