[gnome-control-center/wip/feborges/new-search-panel: 2/6] search: Place the whole content in a scrolled window
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/feborges/new-search-panel: 2/6] search: Place the whole content in a scrolled window
- Date: Thu, 3 Nov 2016 10:28:34 +0000 (UTC)
commit fe166d0743cec27f6ece7283ee248a5071cb004b
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
panels/search/cc-search-panel.c | 6 +++---
panels/search/search.ui | 20 +++++++++-----------
2 files changed, 12 insertions(+), 14 deletions(-)
---
diff --git a/panels/search/cc-search-panel.c b/panels/search/cc-search-panel.c
index d8ebeb2..d370d93 100644
--- a/panels/search/cc-search-panel.c
+++ b/panels/search/cc-search-panel.c
@@ -741,7 +741,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);
@@ -762,11 +762,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..e696af2 100644
--- a/panels/search/search.ui
+++ b/panels/search/search.ui
@@ -1,7 +1,12 @@
<?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>
+ <property name="shadow-type">in</property>
+
+ <child>
+ <object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin-start">134</property>
@@ -9,18 +14,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 +116,6 @@
</packing>
</child>
</object>
+ </child>
+ </object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]