mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
More gtk-demo spacing fixes
This commit is contained in:
parent
76aeb706ef
commit
50a75b37a9
@ -75,6 +75,7 @@ do_colorsel (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox, "margin", 12, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/*
|
||||
|
@ -319,6 +319,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||
g_object_set (vbox, "margin", 10, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/* A combobox demonstrating cell renderers, separators and
|
||||
@ -328,6 +329,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (box, "margin", 5, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
model = create_icon_store ();
|
||||
@ -368,6 +370,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (box, "margin", 5, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
model = create_capital_store ();
|
||||
@ -395,6 +398,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (box, "margin", 5, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
combo = gtk_combo_box_text_new_with_entry ();
|
||||
@ -412,6 +416,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (box, "margin", 5, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
combo = gtk_combo_box_text_new ();
|
||||
|
@ -114,9 +114,11 @@ do_dialog (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
frame = gtk_frame_new ("Dialogs");
|
||||
g_object_set (frame, "margin", 8, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), frame);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox, "margin", 8, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
|
||||
/* Standard message dialog */
|
||||
|
@ -216,6 +216,7 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
G_CALLBACK (close_window), NULL);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox, "margin", 16, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/*
|
||||
|
@ -353,6 +353,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
|
@ -28,6 +28,7 @@ do_entry_buffer (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
|
@ -55,6 +55,7 @@ do_entry_completion (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
|
@ -35,10 +35,7 @@
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="visible">1</property>
|
||||
<property name="margin_left">10</property>
|
||||
<property name="margin_right">10</property>
|
||||
<property name="margin_top">10</property>
|
||||
<property name="margin_bottom">10</property>
|
||||
<property name="margin">10</property>
|
||||
<property name="row_spacing">10</property>
|
||||
<property name="column_spacing">10</property>
|
||||
<property name="column_homogeneous">1</property>
|
||||
|
@ -396,6 +396,7 @@ create_glarea_window (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE);
|
||||
g_object_set (box, "margin", 12, NULL);
|
||||
gtk_box_set_spacing (GTK_BOX (box), 6);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
|
@ -348,6 +348,7 @@ do_images (GtkWidget *do_widget)
|
||||
G_CALLBACK (cleanup_callback), NULL);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox, "margin", 16, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
|
@ -61,6 +61,7 @@ do_infobar (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy", 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);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
@ -131,6 +132,7 @@ do_infobar (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox2, "margin", 8, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox2);
|
||||
|
||||
/* Standard message dialog */
|
||||
|
@ -264,6 +264,7 @@ do_list_store (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox, "margin", 8, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
|
||||
|
@ -85,6 +85,7 @@ create_pane_options (GtkPaned *paned,
|
||||
child2 = gtk_paned_get_child2 (paned);
|
||||
|
||||
frame = gtk_frame_new (frame_label);
|
||||
g_object_set (frame, "margin", 4, NULL);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
@ -146,6 +147,7 @@ do_panes (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||
g_object_set (vpaned, "margin", 5, NULL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), vpaned, TRUE, TRUE);
|
||||
|
||||
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
|
@ -23,6 +23,7 @@ do_pickers (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
g_object_set (table, "margin", 20, NULL);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (table), 3);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (table), 10);
|
||||
gtk_container_add (GTK_CONTAINER (window), table);
|
||||
|
@ -25,6 +25,7 @@ create_popover (GtkWidget *parent,
|
||||
popover = gtk_popover_new (parent);
|
||||
gtk_popover_set_position (GTK_POPOVER (popover), pos);
|
||||
gtk_container_add (GTK_CONTAINER (popover), child);
|
||||
g_object_set (child, "margin", 6, NULL);
|
||||
gtk_widget_show (child);
|
||||
|
||||
return popover;
|
||||
@ -131,6 +132,7 @@ do_popover (GtkWidget *do_widget)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 24);
|
||||
g_object_set (box, "margin", 24, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
|
@ -26,6 +26,7 @@
|
||||
<property name="visible">1</property>
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<property name="margin">20</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
|
@ -238,6 +238,7 @@ do_search_entry (GtkWidget *do_widget)
|
||||
G_CALLBACK (search_entry_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
|
@ -108,6 +108,7 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
@ -118,6 +119,7 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
g_object_set (table, "margin", 5, NULL);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (table), 5);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (table), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
@ -130,6 +132,7 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
g_object_set (table, "margin", 5, NULL);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (table), 5);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (table), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
@ -52,6 +52,7 @@ do_spinner (GtkWidget *do_widget)
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE);
|
||||
|
||||
/* Sensitive */
|
||||
|
@ -13,9 +13,7 @@
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="is_important">1</property>
|
||||
@ -27,9 +25,7 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="label" translatable="yes">Active</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="is_important">1</property>
|
||||
@ -42,7 +38,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="label" translatable="yes">Insensitive</property>
|
||||
@ -56,7 +51,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Raised</property>
|
||||
<property name="use_underline">1</property>
|
||||
@ -72,7 +66,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Raised Active</property>
|
||||
<property name="use_underline">1</property>
|
||||
@ -89,7 +82,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="label" translatable="yes">Insensitive Active</property>
|
||||
@ -104,7 +96,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="entry1">
|
||||
@ -119,7 +110,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="switch1">
|
||||
@ -142,21 +132,17 @@
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">Hi, I am a button</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">And I'm another button</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
@ -165,11 +151,9 @@
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">This is a button party!</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
@ -188,9 +172,7 @@
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="icon_name">list-add-symbolic</property>
|
||||
@ -201,9 +183,7 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="icon_name">list-add-symbolic</property>
|
||||
@ -214,9 +194,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="label" translatable="yes">Active</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="icon_name">list-remove-symbolic</property>
|
||||
@ -228,9 +205,7 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="label" translatable="yes">Active</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="icon_name">list-remove-symbolic</property>
|
||||
@ -242,10 +217,8 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="label" translatable="yes">Insensitive</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="icon_name">edit-find-symbolic</property>
|
||||
@ -256,10 +229,8 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="label" translatable="yes">Insensitive Active</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="icon_name">go-up-symbolic</property>
|
||||
|
@ -446,6 +446,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
|
||||
/* Add widgets to control the ToolPalette appearance: */
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||
g_object_set (box, "margin", 6, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
/* Orientation combo box: */
|
||||
@ -528,6 +529,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (palette_scroller),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
g_object_set (palette_scroller, "margin", 6, NULL);
|
||||
gtk_widget_set_hexpand (palette_scroller, TRUE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (palette_scroller), palette);
|
||||
@ -547,6 +549,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
/* ===== notebook ===== */
|
||||
|
||||
notebook = gtk_notebook_new ();
|
||||
g_object_set (notebook, "margin", 6, NULL);
|
||||
gtk_box_pack_end (GTK_BOX(hbox), notebook, FALSE, FALSE);
|
||||
|
||||
/* ===== DnD for tool items ===== */
|
||||
@ -586,6 +589,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
contents_scroller,
|
||||
gtk_label_new ("Passive DnD Mode"));
|
||||
g_object_set (contents_scroller, "margin", 6, NULL);
|
||||
|
||||
/* ===== interactive DnD dest ===== */
|
||||
|
||||
|
@ -398,6 +398,7 @@ do_tree_store (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox, "margin", 8, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
|
Loading…
Reference in New Issue
Block a user