[gnome-system-monitor] Fixed search bar spacing (bgo #755204)



commit 006059601e7824370fedee287278d011fc895e71
Author: Robert Roth <robert roth off gmail com>
Date:   Wed Sep 23 00:59:44 2015 +0300

    Fixed search bar spacing (bgo #755204)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=755204

 data/interface.ui |    4 +++-
 src/interface.cpp |    1 +
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/data/interface.ui b/data/interface.ui
index 9c0dac7..fefe5f0 100644
--- a/data/interface.ui
+++ b/data/interface.ui
@@ -81,8 +81,10 @@
                 <property name="orientation">vertical</property>
                 <child>
                   <object class="GtkSearchBar" id="proc_searchbar">
-                    <property name="visible">True</property>
+                    <property name="visible">False</property>
                     <property name="can_focus">False</property>
+                    <property name="vexpand_set">True</property>
+                    <property name="vexpand">False</property>
                     <child>
                       <object class="GtkSearchEntry" id="proc_searchentry">
                         <property name="visible">True</property>
diff --git a/src/interface.cpp b/src/interface.cpp
index 582bb80..a93c478 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -459,6 +459,7 @@ on_activate_search (GSimpleAction *action, GVariant *parameter, gpointer data)
     GVariant *state = g_action_get_state (G_ACTION (action));
     gboolean is_search_shortcut = g_variant_get_boolean (parameter);
     gboolean is_search_bar = gtk_search_bar_get_search_mode (GTK_SEARCH_BAR (app->search_bar));
+    gtk_widget_set_visible (app->search_bar, is_search_bar || is_search_shortcut);
     if (is_search_shortcut && is_search_bar) {
         gtk_widget_grab_focus (app->search_entry);
     } else {


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