[gnome-control-center] search: Place the whole content in a scrolled window



commit a0dccafaa2866b908af6a978d6b134bf7d1eb599
Author: Felipe Borges <felipeborges gnome org>
Date:   Wed Aug 10 13:16:04 2016 +0200

    search: Place the whole content in a scrolled window
    
    A step towards the new panel design is to place all
    the panel content inside of a scrolled window, instead
    of just the list box.
    
    The new panel mockups are available at
    https://wiki.gnome.org/Design/SystemSettings/Search
    
    https://bugzilla.gnome.org/show_bug.cgi?id=775958

 panels/search/cc-search-panel.c |    6 +++---
 panels/search/search.ui         |   18 +++++++-----------
 2 files changed, 10 insertions(+), 14 deletions(-)
---
diff --git a/panels/search/cc-search-panel.c b/panels/search/cc-search-panel.c
index e619a08..556e40d 100644
--- a/panels/search/cc-search-panel.c
+++ b/panels/search/cc-search-panel.c
@@ -749,7 +749,7 @@ cc_search_panel_init (CcSearchPanel *self)
 {
   GError    *error;
   GtkWidget *widget;
-  GtkWidget *scrolled_window;
+  GtkWidget *frame;
   guint res;
 
   self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, CC_TYPE_SEARCH_PANEL, CcSearchPanelPrivate);
@@ -770,11 +770,11 @@ cc_search_panel_init (CcSearchPanel *self)
       return;
     }
 
-  scrolled_window = WID ("scrolled_window");
+  frame = WID ("search_frame");
   widget = GTK_WIDGET (gtk_list_box_new ());
   gtk_list_box_set_sort_func (GTK_LIST_BOX (widget),
                               (GtkListBoxSortFunc)list_sort_func, self, NULL);
-  gtk_container_add (GTK_CONTAINER (scrolled_window), widget);
+  gtk_container_add (GTK_CONTAINER (frame), widget);
   self->priv->list_box = widget;
   gtk_widget_show (widget);
 
diff --git a/panels/search/search.ui b/panels/search/search.ui
index e4d2f97..8e72e36 100644
--- a/panels/search/search.ui
+++ b/panels/search/search.ui
@@ -1,7 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-      <object class="GtkBox" id="search_vbox">
+  <object class="GtkScrolledWindow" id="search_vbox">
+    <property name="visible">True</property>
+    <child>
+      <object class="GtkBox">
         <property name="visible">True</property>
         <property name="orientation">vertical</property>
         <property name="margin-start">134</property>
@@ -9,18 +12,9 @@
         <property name="margin-top">22</property>
         <property name="margin-bottom">22</property>
         <child>
-          <object class="GtkScrolledWindow" id="scrolled_window">
+          <object class="GtkFrame" id="search_frame">
             <property name="visible">True</property>
-            <property name="shadow-type">in</property>
-            <property name="vexpand">True</property>
-            <property name="width-request">400</property>
-            <property name="height-request">350</property>
           </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkToolbar" id="search_toolbar">
@@ -120,4 +114,6 @@
           </packing>
         </child>
       </object>
+   </child>
+ </object>
 </interface>


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