[gnome-documents] preview: Link searchbar with next and previous buttons



commit 430fca75bbc4579b608699770a6ec3085a86fc89
Author: Alessandro Bono <abono gnome org>
Date:   Sun Nov 29 16:57:48 2015 +0100

    preview: Link searchbar with next and previous buttons
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759088

 src/preview.js |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/src/preview.js b/src/preview.js
index e5b5d41..6ce6ce6 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -942,8 +942,8 @@ const PreviewSearchbar = new Lang.Class({
 
     createSearchWidgets: function() {
         this._searchContainer = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL,
-                                              spacing: 6,
                                               halign: Gtk.Align.CENTER});
+        this._searchContainer.get_style_context().add_class('linked');
 
         this._searchEntry = new Gtk.SearchEntry({ width_request: 500 });
         this._searchEntry.connect('activate', Lang.bind(this,
@@ -952,23 +952,17 @@ const PreviewSearchbar = new Lang.Class({
             }));
         this._searchContainer.add(this._searchEntry);
 
-        let controlsBox = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL });
-        controlsBox.get_style_context().add_class('linked');
-        this._searchContainer.add(controlsBox);
-
         this._prev = new Gtk.Button({ action_name: 'app.find-prev' });
         this._prev.set_image(new Gtk.Image({ icon_name: 'go-up-symbolic',
-                                             icon_size: Gtk.IconSize.MENU,
-                                             margin: 2 }));
+                                             icon_size: Gtk.IconSize.MENU }));
         this._prev.set_tooltip_text(_("Find Previous"));
-        controlsBox.add(this._prev);
+        this._searchContainer.add(this._prev);
 
         this._next = new Gtk.Button({ action_name: 'app.find-next' });
         this._next.set_image(new Gtk.Image({ icon_name: 'go-down-symbolic',
-                                             icon_size: Gtk.IconSize.MENU,
-                                             margin: 2 }));
+                                             icon_size: Gtk.IconSize.MENU }));
         this._next.set_tooltip_text(_("Find Next"));
-        controlsBox.add(this._next);
+        this._searchContainer.add(this._next);
 
         this._onSearchChanged(this._previewView, false);
     },


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