[gnome-shell-extensions/wip/rstrode/heads-up-display: 42/62] workspace-indicator: Minor cleanup




commit 9ffd4cf12319a7abb280d9b6b09db0e4e8fa6d62
Author: Florian Müllner <fmuellner gnome org>
Date:   Sun Jun 9 23:17:35 2019 +0000

    workspace-indicator: Minor cleanup
    
    Pass the style class at construction time instead of setting it later.
    
    https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/71

 extensions/workspace-indicator/extension.js | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/extensions/workspace-indicator/extension.js b/extensions/workspace-indicator/extension.js
index 34fc275..672b98d 100644
--- a/extensions/workspace-indicator/extension.js
+++ b/extensions/workspace-indicator/extension.js
@@ -24,6 +24,7 @@ class WorkspaceIndicator extends PanelMenu.Button {
 
         this._currentWorkspace = workspaceManager.get_active_workspace_index();
         this._statusLabel = new St.Label({
+            style_class: 'panel-workspace-indicator',
             y_align: Clutter.ActorAlign.CENTER,
             text: this._labelText()
         });
@@ -44,9 +45,6 @@ class WorkspaceIndicator extends PanelMenu.Button {
         this.connect('scroll-event', this._onScrollEvent.bind(this));
         this._createWorkspacesSection();
 
-        //styling
-        this._statusLabel.add_style_class_name('panel-workspace-indicator');
-
         this._settings = new Gio.Settings({ schema_id: WORKSPACE_SCHEMA });
         this._settingsChangedId = this._settings.connect(
             `changed::${WORKSPACE_KEY}`,


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