[gnome-shell-extensions] window-list: Improve workspace label styling
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] window-list: Improve workspace label styling
- Date: Fri, 19 Jul 2019 11:14:26 +0000 (UTC)
commit a5f347ba10408a30d1a2ffeff020f3a63c2784f1
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 1f2e1c1..598c516 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]