summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorWilliam Jon McCann <william.jon.mccann@gmail.com>2014-01-11 22:46:19 -0500
committerMatthias Clasen <mclasen@redhat.com>2014-01-17 17:52:07 -0500
commit7ed29589436a84727aad0f8702b0f7f0e3603c5b (patch)
tree797a019e632c145b082c7da4ed2c482e31881bce /demos
parent1258eadd7501d47111074997da4e2339c3f04b4f (diff)
downloadgtk+-7ed29589436a84727aad0f8702b0f7f0e3603c5b.tar.gz
demo: Add new button box layouts
This adds a test case for the new expand layout. https://bugzilla.gnome.org/show_bug.cgi?id=720059
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/button_box.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/demos/gtk-demo/button_box.c b/demos/gtk-demo/button_box.c
index 3ad1707faf..f542136cad 100644
--- a/demos/gtk-demo/button_box.c
+++ b/demos/gtk-demo/button_box.c
@@ -90,6 +90,14 @@ do_button_box (GtkWidget *do_widget)
create_bbox (TRUE, "End", 40, GTK_BUTTONBOX_END),
TRUE, TRUE, 5);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ create_bbox (TRUE, "Center", 40, GTK_BUTTONBOX_CENTER),
+ TRUE, TRUE, 5);
+
+ gtk_box_pack_start (GTK_BOX (vbox),
+ create_bbox (TRUE, "Expand", 40, GTK_BUTTONBOX_EXPAND),
+ TRUE, TRUE, 5);
+
frame_vert = gtk_frame_new ("Vertical Button Boxes");
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, 10);
@@ -98,19 +106,25 @@ do_button_box (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
gtk_box_pack_start (GTK_BOX (hbox),
- create_bbox (FALSE, "Spread", 30, GTK_BUTTONBOX_SPREAD),
+ create_bbox (FALSE, "Spread", 10, GTK_BUTTONBOX_SPREAD),
TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox),
- create_bbox (FALSE, "Edge", 30, GTK_BUTTONBOX_EDGE),
+ create_bbox (FALSE, "Edge", 10, GTK_BUTTONBOX_EDGE),
TRUE, TRUE, 5);
gtk_box_pack_start (GTK_BOX (hbox),
- create_bbox (FALSE, "Start", 30, GTK_BUTTONBOX_START),
+ create_bbox (FALSE, "Start", 10, GTK_BUTTONBOX_START),
TRUE, TRUE, 5);
gtk_box_pack_start (GTK_BOX (hbox),
- create_bbox (FALSE, "End", 30, GTK_BUTTONBOX_END),
+ create_bbox (FALSE, "End", 10, GTK_BUTTONBOX_END),
+ TRUE, TRUE, 5);
+ gtk_box_pack_start (GTK_BOX (hbox),
+ create_bbox (FALSE, "Center", 10, GTK_BUTTONBOX_CENTER),
+ TRUE, TRUE, 5);
+ gtk_box_pack_start (GTK_BOX (hbox),
+ create_bbox (FALSE, "Expand", 10, GTK_BUTTONBOX_EXPAND),
TRUE, TRUE, 5);
}