[gtk+] gtk-demo: Start to fix up the spacing



commit 76aeb706ef7bb224f305ec84079de8e2290c1ffe
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Oct 26 15:03:04 2016 -0400

    gtk-demo: Start to fix up the spacing
    
    Replace some cases of lost border-width with margins.

 demos/gtk-demo/button_box.c    |    5 +++++
 demos/gtk-demo/changedisplay.c |    2 ++
 demos/gtk-demo/clipboard.c     |    4 ++++
 3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/demos/gtk-demo/button_box.c b/demos/gtk-demo/button_box.c
index d5182b0..180d639 100644
--- a/demos/gtk-demo/button_box.c
+++ b/demos/gtk-demo/button_box.c
@@ -23,6 +23,8 @@ create_bbox (gint  horizontal,
   else
     bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
 
+  g_object_set (bbox, "margin", 5, NULL);
+
   gtk_container_add (GTK_CONTAINER (frame), bbox);
 
   gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
@@ -62,6 +64,7 @@ do_button_box (GtkWidget *do_widget)
                       &window);
 
     main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+    g_object_set (main_vbox, "margin", 10, NULL);
     gtk_container_add (GTK_CONTAINER (window), main_vbox);
 
     frame_horz = gtk_frame_new ("Horizontal Button Boxes");
@@ -70,6 +73,7 @@ do_button_box (GtkWidget *do_widget)
     gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE);
 
     vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
+    g_object_set (vbox, "margin", 10, NULL);
     gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
 
     gtk_box_pack_start (GTK_BOX (vbox),
@@ -100,6 +104,7 @@ do_button_box (GtkWidget *do_widget)
     gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE);
 
     hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
+    g_object_set (hbox, "margin", 10, NULL);
     gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
 
     gtk_box_pack_start (GTK_BOX (hbox),
diff --git a/demos/gtk-demo/changedisplay.c b/demos/gtk-demo/changedisplay.c
index 6a066e2..f8137c8 100644
--- a/demos/gtk-demo/changedisplay.c
+++ b/demos/gtk-demo/changedisplay.c
@@ -305,6 +305,7 @@ create_frame (ChangeDisplayInfo *info,
   *frame = gtk_frame_new (title);
 
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
+  g_object_set (hbox, "margin", 8, NULL);
   gtk_container_add (GTK_CONTAINER (*frame), hbox);
 
   scrollwin = gtk_scrolled_window_new (NULL, NULL);
@@ -538,6 +539,7 @@ do_changedisplay (GtkWidget *do_widget)
       content_area = gtk_dialog_get_content_area (GTK_DIALOG (info->window));
 
       vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
+      g_object_set (vbox, "margin", 8, NULL);
       gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE);
 
       frame = create_display_frame (info);
diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c
index e3ca3ea..4a038d6 100644
--- a/demos/gtk-demo/clipboard.c
+++ b/demos/gtk-demo/clipboard.c
@@ -219,6 +219,7 @@ do_clipboard (GtkWidget *do_widget)
                         G_CALLBACK (gtk_widget_destroyed), &window);
 
       vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+      g_object_set (vbox, "margin", 8, NULL);
 
       gtk_container_add (GTK_CONTAINER (window), vbox);
 
@@ -227,6 +228,7 @@ do_clipboard (GtkWidget *do_widget)
       gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
 
       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
+      g_object_set (hbox, "margin", 8, NULL);
       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE);
 
       /* Create the first entry */
@@ -243,6 +245,7 @@ do_clipboard (GtkWidget *do_widget)
       gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
 
       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
+      g_object_set (hbox, "margin", 8, NULL);
       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE);
 
       /* Create the second entry */
@@ -259,6 +262,7 @@ do_clipboard (GtkWidget *do_widget)
       gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
 
       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
+      g_object_set (hbox, "margin", 8, NULL);
       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE);
 
       /* Create the first image */


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