[polari/popover: 3/4] userList: Adapt style to popover changes



commit f2ea430692c23b0c09937ba2e1a86496df2e4ec2
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Feb 21 12:29:10 2014 +0100

    userList: Adapt style to popover changes
    
    After changing the sidebar into a popover, borders and spacing looks
    slightly off; tweak them a bit to fit the new UI.

 data/resources/application.css |    4 ----
 src/userList.js                |   14 ++++++--------
 2 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/data/resources/application.css b/data/resources/application.css
index 5d2482a..01673dd 100644
--- a/data/resources/application.css
+++ b/data/resources/application.css
@@ -18,10 +18,6 @@
     border-width: 0 0 0 1px;
 }
 
-.polari-user-list-search-area {
-    border-width: 0 0 1px 0;
-}
-
 .polari-user-list .list-row {
     -GtkWidget-focus-padding: 0;
 }
diff --git a/src/userList.js b/src/userList.js
index 70bfb8b..0145cb0 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -45,17 +45,14 @@ const UserListPopover = new Lang.Class({
 
         this.widget.get_style_context().add_class('polari-user-list');
 
-        this._box = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL });
+        this._box = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL,
+                                  spacing: 6 });
         this.widget.add(this._box);
 
         this._revealer = new Gtk.Revealer();
         this._box.add(this._revealer);
 
-        let frame = new Gtk.Frame();
-        frame.get_style_context().add_class('polari-user-list-search-area');
-        this._revealer.add(frame);
-
-        this._entry = new Gtk.SearchEntry({ margin: 4 });
+        this._entry = new Gtk.SearchEntry();
         this._entry.connect('search-changed',
                             Lang.bind(this, this._updateFilter));
         this._entry.connect('key-press-event', Lang.bind(this,
@@ -67,7 +64,7 @@ const UserListPopover = new Lang.Class({
                 }
                 return false;
             }));
-        frame.add(this._entry);
+        this._revealer.add(this._entry);
 
         this._box.show_all();
     },
@@ -323,7 +320,8 @@ const UserList = new Lang.Class({
     Name: 'UserList',
 
     _init: function(room) {
-        this.widget = new Gtk.ScrolledWindow({ hexpand: true, vexpand: true });
+        this.widget = new Gtk.ScrolledWindow({ hexpand: true, vexpand: true,
+                                               shadow_type: Gtk.ShadowType.ETCHED_IN });
         this.widget.hscrollbar_policy = Gtk.PolicyType.NEVER;
 
         this._list = new Gtk.ListBox();


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