[gtk+/dialogs: 6/25] demo: Add new button box layouts



commit 154fdb1085b68f482fb142bf3a24abe4e917dee6
Author: William Jon McCann <william jon mccann gmail com>
Date:   Sat Jan 11 22:46:19 2014 -0500

    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

 demos/gtk-demo/button_box.c |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/demos/gtk-demo/button_box.c b/demos/gtk-demo/button_box.c
index 3ad1707..f542136 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);
   }
 


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