[gnome-shell-extensions/wip/window-list: 6/13] Use notification counter instead of 'info' to raise message tray



commit d997acf75caaac4174fb94aab3fa2b4ca9149e55
Author: Florian MÃllner <fmuellner gnome org>
Date:   Fri Jan 18 17:39:38 2013 +0100

    Use notification counter instead of 'info' to raise message tray

 extensions/window-list/extension.js   |   12 ++++++++----
 extensions/window-list/stylesheet.css |    4 ----
 2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index 023775e..f2383ab 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -84,10 +84,13 @@ const TrayButton = new Lang.Class({
     Name: 'TrayButton',
 
     _init: function() {
-        let icon = new St.Icon({ icon_name: 'dialog-information-symbolic',
-                                 style_class: 'system-status-icon' });
-        this.actor = new St.Button({ style_class: 'tray-button',
-                                     child: icon });
+        this._counterLabel = new St.Label({ x_align: Clutter.ActorAlign.CENTER,
+                                            x_expand: true,
+                                            y_align: Clutter.ActorAlign.CENTER,
+                                            y_expand: true });
+        this.actor = new St.Button({ style_class: 'summary-source-counter',
+                                     child: this._counterLabel,
+                                     layoutManager: new Clutter.BinLayout() });
         this.actor.set_x_align(Clutter.ActorAlign.END);
         this.actor.set_x_expand(true);
         this.actor.set_y_expand(true);
@@ -125,6 +128,7 @@ const TrayButton = new Lang.Class({
     },
 
     _updateVisibility: function() {
+        this._counterLabel.text = this._trayItemCount.toString();
         this.actor.visible = this._trayItemCount > 0;
     },
 
diff --git a/extensions/window-list/stylesheet.css b/extensions/window-list/stylesheet.css
index d69a326..8802778 100644
--- a/extensions/window-list/stylesheet.css
+++ b/extensions/window-list/stylesheet.css
@@ -64,7 +64,3 @@
   width: 24px;
   height: 24px;
 }
-
-.tray-button {
-  padding: 1px 1px 1px 4px;
-}



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