[devhelp] Sidebar: hexpand and vexpand



commit f44eb53c1c95244cf5716630159c5455e9f22467
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Feb 2 13:41:07 2018 +0100

    Sidebar: hexpand and vexpand

 src/dh-sidebar.c |    3 +++
 src/dh-window.c  |    2 --
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/dh-sidebar.c b/src/dh-sidebar.c
index e939c1b..c1656e0 100644
--- a/src/dh-sidebar.c
+++ b/src/dh-sidebar.c
@@ -464,6 +464,9 @@ dh_sidebar_init (DhSidebar *sidebar)
         gtk_orientable_set_orientation (GTK_ORIENTABLE (sidebar),
                                         GTK_ORIENTATION_VERTICAL);
 
+        gtk_widget_set_hexpand (GTK_WIDGET (sidebar), TRUE);
+        gtk_widget_set_vexpand (GTK_WIDGET (sidebar), TRUE);
+
         /* Setup the search entry */
         priv->entry = GTK_ENTRY (gtk_search_entry_new ());
         gtk_widget_set_hexpand (GTK_WIDGET (priv->entry), TRUE);
diff --git a/src/dh-window.c b/src/dh-window.c
index a12156d..e3c4771 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -639,8 +639,6 @@ window_populate (DhWindow *window)
 
         /* Sidebar */
         priv->sidebar = DH_SIDEBAR (dh_sidebar_new (NULL));
-        gtk_widget_set_vexpand (GTK_WIDGET (priv->sidebar), TRUE);
-        gtk_widget_set_hexpand (GTK_WIDGET (priv->sidebar), TRUE);
         gtk_widget_show (GTK_WIDGET (priv->sidebar));
         gtk_container_add (GTK_CONTAINER (priv->grid_sidebar),
                            GTK_WIDGET (priv->sidebar));


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