[gnome-documents] searchbar: don't expand horizontally



commit a3423629bcc8c1e0df1ca82f74f51726f2e06d71
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Nov 5 11:56:50 2012 -0500

    searchbar: don't expand horizontally
    
    Use a size of 500px instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=687644

 src/preview.js   |    5 +++--
 src/searchbar.js |   19 ++++++++-----------
 2 files changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/src/preview.js b/src/preview.js
index 691eea5..9b07469 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -450,9 +450,10 @@ const PreviewSearchbar = new Lang.Class({
 
     createSearchWidgets: function() {
         this._searchContainer = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL,
-                                              spacing: 6 });
+                                              spacing: 6,
+                                              halign: Gtk.Align.CENTER});
 
-        this._searchEntry = new Gtk.SearchEntry({ hexpand: true });
+        this._searchEntry = new Gtk.SearchEntry({ width_request: 500 });
         this._searchEntry.connect('activate', Lang.bind(this,
             function() {
                 Global.application.activate_action('find-next', null);
diff --git a/src/searchbar.js b/src/searchbar.js
index c57b0ff..0759ec7 100644
--- a/src/searchbar.js
+++ b/src/searchbar.js
@@ -535,15 +535,9 @@ const OverviewSearchbar = new Lang.Class({
     },
 
     createSearchWidgets: function() {
-        this._searchContainer = new Gd.MarginContainer({ min_margin: 64,
-                                                         max_margin: 128 });
-        this._box = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL });
-        this._searchContainer.add(this._box);
-
         // create the search entry
-        this._searchEntry = new Gd.TaggedEntry({ width_request: 260,
-                                                 no_show_all: true,
-                                                 hexpand: true });
+        this._searchEntry = new Gd.TaggedEntry({ width_request: 500,
+                                                 no_show_all: true });
         this._searchEntry.connect('tag-clicked',
             Lang.bind(this, this._onTagClicked));
         this._searchEntry.set_text(Global.searchController.getString());
@@ -564,9 +558,12 @@ const OverviewSearchbar = new Lang.Class({
                 this._dropdownButton.set_active(false);
             }));
 
-        this._box.add(this._searchEntry);
-        this._box.add(this._dropdownButton);
-        this._box.show_all();
+        this._searchContainer = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL,
+                                              halign: Gtk.Align.CENTER });
+
+        this._searchContainer.add(this._searchEntry);
+        this._searchContainer.add(this._dropdownButton);
+        this._searchContainer.show_all();
     },
 
     entryChanged: function() {



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