[gtk/wip/baedert/box2: 16/33] shortcutssection: Use a center box as footer
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/box2: 16/33] shortcutssection: Use a center box as footer
- Date: Mon, 31 Dec 2018 17:07:24 +0000 (UTC)
commit 7930d58908b2ff214aab5b05a1b3ac70253f2b24
Author: Timm Bäder <mail baedert org>
Date: Wed Dec 26 07:08:16 2018 +0100
shortcutssection: Use a center box as footer
gtk/gtkshortcutssection.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkshortcutssection.c b/gtk/gtkshortcutssection.c
index 885d3665a2..e597b20be9 100644
--- a/gtk/gtkshortcutssection.c
+++ b/gtk/gtkshortcutssection.c
@@ -34,6 +34,7 @@
#include "gtkmarshalers.h"
#include "gtkgesturepan.h"
#include "gtkwidgetprivate.h"
+#include "gtkcenterbox.h"
#include "gtkintl.h"
/**
@@ -444,13 +445,13 @@ gtk_shortcuts_section_init (GtkShortcutsSection *self)
g_signal_connect_swapped (self->show_all, "clicked",
G_CALLBACK (gtk_shortcuts_section_show_all), self);
- self->footer = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20);
+ self->footer = gtk_center_box_new ();
GTK_CONTAINER_CLASS (gtk_shortcuts_section_parent_class)->add (GTK_CONTAINER (self), self->footer);
gtk_widget_set_hexpand (GTK_WIDGET (self->switcher), TRUE);
gtk_widget_set_halign (GTK_WIDGET (self->switcher), GTK_ALIGN_CENTER);
- gtk_container_add (GTK_CONTAINER (self->footer), GTK_WIDGET (self->switcher));
- gtk_box_pack_end (GTK_BOX (self->footer), self->show_all);
+ gtk_center_box_set_center_widget (GTK_CENTER_BOX (self->footer), GTK_WIDGET (self->switcher));
+ gtk_center_box_set_end_widget (GTK_CENTER_BOX (self->footer), self->show_all);
gtk_widget_set_halign (self->show_all, GTK_ALIGN_END);
gesture = gtk_gesture_pan_new (GTK_ORIENTATION_HORIZONTAL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]