[gnome-shell] [AppSwitcher] Reimplement the separator using St.Bin



commit 8e9549c6f176d1b21df58bf83d85063e91b7d21d
Author: Steve Frécinaux <code istique net>
Date:   Fri Oct 16 00:34:23 2009 +0200

    [AppSwitcher] Reimplement the separator using St.Bin
    
    This way it can be styled using CSS.
    This can help to fix bug 597362.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=598651

 data/theme/gnome-shell.css |    5 +++++
 js/ui/altTab.js            |    8 +-------
 2 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 42097fe..dfabaac 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -174,3 +174,8 @@ StScrollBar StButton#vhandle:hover
     border-radius: 4px;
     background: rgba(255,255,255,0.33);
 }
+
+.switcher-list .separator {
+    width: 1px;
+    background: rgba(255,255,255,0.33);
+}
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 62b95e3..570b594 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -18,8 +18,6 @@ const POPUP_ARROW_COLOR = new Clutter.Color();
 POPUP_ARROW_COLOR.from_pixel(0xffffffff);
 const TRANSPARENT_COLOR = new Clutter.Color();
 TRANSPARENT_COLOR.from_pixel(0x00000000);
-const POPUP_SEPARATOR_COLOR = new Clutter.Color();
-POPUP_SEPARATOR_COLOR.from_pixel(0x80808066);
 
 const POPUP_APPICON_SIZE = 96;
 const POPUP_LIST_SPACING = 8;
@@ -385,11 +383,7 @@ SwitcherList.prototype = {
     },
 
     addSeparator: function () {
-        // FIXME: make this work with StWidgets and CSS
-        let box = new Big.Box({ padding_top: 2, padding_bottom: 2 });
-        box.append(new Clutter.Rectangle({ width: 1,
-                                           color: POPUP_SEPARATOR_COLOR }),
-                   Big.BoxPackFlags.EXPAND);
+        let box = new St.Bin({ style_class: 'separator' })
         this._separator = box;
         this._list.add_actor(box);
     },



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