[gtk+/wip/matthiasc/help-overlay] Hide the bottom box in sections until needed
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/help-overlay] Hide the bottom box in sections until needed
- Date: Tue, 13 Oct 2015 13:03:46 +0000 (UTC)
commit 2e3e788b0b9d9944ae87032c7b0eac946ef13b70
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Oct 13 08:58:15 2015 -0400
Hide the bottom box in sections until needed
This avoids some extraneous whitespace.
gtk/gtkshortcutssection.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkshortcutssection.c b/gtk/gtkshortcutssection.c
index 29cd57c..6830957 100644
--- a/gtk/gtkshortcutssection.c
+++ b/gtk/gtkshortcutssection.c
@@ -97,6 +97,8 @@ gtk_shortcuts_section_add (GtkContainer *container,
gtk_container_foreach (GTK_CONTAINER (self->switcher), adjust_page_buttons, &count);
gtk_widget_set_visible (GTK_WIDGET (self->switcher), (count > 1));
+ if (count > 1)
+ gtk_widget_show (gtk_widget_get_parent (GTK_WIDGET (self->switcher)));
g_free (title);
}
else
@@ -234,6 +236,8 @@ filter_groups_by_view (GtkShortcutsSection *self)
self->has_filtered_group = FALSE;
gtk_container_foreach (GTK_CONTAINER (self), update_group_visibility, self);
gtk_widget_set_visible (GTK_WIDGET (self->show_all), self->has_filtered_group);
+ if (self->has_filtered_group)
+ gtk_widget_show (gtk_widget_get_parent (GTK_WIDGET (self->show_all)));
}
static void
@@ -269,7 +273,6 @@ gtk_shortcuts_section_init (GtkShortcutsSection *self)
G_CALLBACK (filter_groups_by_view), self);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20);
- gtk_widget_show (box);
gtk_container_add (GTK_CONTAINER (self), box);
gtk_box_set_center_widget (GTK_BOX (box), GTK_WIDGET (self->switcher));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]