[gtk/expand-margin-cleanup: 1/2] Drop the margin property
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/expand-margin-cleanup: 1/2] Drop the margin property
- Date: Wed, 26 Feb 2020 12:24:45 +0000 (UTC)
commit b5bacb3be640a25eb7573090df6d1af6a9adcc7e
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Feb 25 20:57:20 2020 -0500
Drop the margin property
Replace it with margin-start, -end, -top, -bottom throughout.
demos/constraint-editor/constraint-editor-window.c | 5 +-
demos/constraint-editor/constraint-editor.ui | 5 +-
demos/constraint-editor/guide-editor.ui | 5 +-
demos/gtk-demo/assistant.c | 10 +-
demos/gtk-demo/clipboard.c | 20 ++-
demos/gtk-demo/colorsel.c | 5 +-
demos/gtk-demo/combobox.c | 25 ++-
demos/gtk-demo/cursors.ui | 185 ++++++++++++++++-----
demos/gtk-demo/dialog.c | 10 +-
demos/gtk-demo/drawingarea.c | 5 +-
demos/gtk-demo/editable_cells.c | 5 +-
demos/gtk-demo/entry_completion.c | 5 +-
demos/gtk-demo/entry_undo.c | 5 +-
demos/gtk-demo/filtermodel.ui | 5 +-
demos/gtk-demo/font-features.ui | 10 +-
demos/gtk-demo/glarea.c | 5 +-
demos/gtk-demo/iconscroll.c | 5 +-
demos/gtk-demo/images.c | 5 +-
demos/gtk-demo/infobar.c | 10 +-
demos/gtk-demo/list_store.c | 5 +-
demos/gtk-demo/modelbutton.ui | 20 ++-
demos/gtk-demo/panes.c | 10 +-
demos/gtk-demo/password_entry.c | 5 +-
demos/gtk-demo/pickers.c | 5 +-
demos/gtk-demo/popover.c | 10 +-
demos/gtk-demo/scale.ui | 5 +-
demos/gtk-demo/search_entry.c | 5 +-
demos/gtk-demo/shortcuts.ui | 5 +-
demos/gtk-demo/sizegroup.c | 15 +-
demos/gtk-demo/sliding_puzzle.c | 5 +-
demos/gtk-demo/spinbutton.ui | 5 +-
demos/gtk-demo/spinner.c | 5 +-
demos/gtk-demo/tagged_entry.c | 5 +-
demos/gtk-demo/themes.ui | 5 +-
demos/gtk-demo/theming.ui | 5 +-
demos/gtk-demo/transparent.c | 10 +-
demos/gtk-demo/tree_store.c | 5 +-
demos/icon-browser/iconbrowserwin.c | 5 +-
demos/icon-browser/window.ui | 15 +-
demos/widget-factory/widget-factory.c | 20 ++-
demos/widget-factory/widget-factory.ui | 91 ++++++++--
docs/tools/widgets.c | 8 +-
examples/application10/prefs.ui | 5 +-
examples/application6/prefs.ui | 5 +-
examples/application7/prefs.ui | 5 +-
examples/application8/prefs.ui | 5 +-
examples/application9/prefs.ui | 5 +-
gtk/gtkcustompaperunixdialog.c | 5 +-
gtk/gtkmenusectionbox.c | 3 -
gtk/gtkmodelbutton.c | 5 +-
gtk/gtkplacessidebar.c | 5 +-
gtk/gtkprintbackend.c | 5 +-
gtk/gtkshortcutswindow.c | 10 +-
gtk/gtktext.c | 5 +-
gtk/gtktextview.c | 5 +-
gtk/gtkwidget.c | 29 ----
gtk/inspector/controllers.c | 5 +-
gtk/inspector/css-editor.ui | 5 +-
gtk/inspector/data-list.ui | 5 +-
gtk/inspector/general.c | 8 +-
gtk/inspector/general.ui | 100 ++++++++---
gtk/inspector/logs.ui | 5 +-
gtk/inspector/misc-info.ui | 110 +++++++++---
gtk/inspector/recorder.c | 11 +-
gtk/inspector/recorder.ui | 5 +-
gtk/inspector/resource-list.ui | 5 +-
gtk/inspector/size-groups.c | 15 +-
gtk/inspector/type-info.c | 15 +-
gtk/inspector/visual.ui | 105 +++++++++---
gtk/inspector/window.ui | 25 ++-
gtk/ui/gtkaboutdialog.ui | 15 +-
gtk/ui/gtkappchooserwidget.ui | 5 +-
gtk/ui/gtkassistant.ui | 5 +-
gtk/ui/gtkcolorchooserdialog.ui | 10 +-
gtk/ui/gtkemojichooser.ui | 5 +-
gtk/ui/gtkfilechooserdialog.ui | 5 +-
gtk/ui/gtkfilechooserwidget.ui | 25 ++-
gtk/ui/gtkfontchooserdialog.ui | 5 +-
gtk/ui/gtkfontchooserwidget.ui | 5 +-
gtk/ui/gtkpagesetupunixdialog.ui | 10 +-
gtk/ui/gtkplacesview.ui | 10 +-
gtk/ui/gtkprintunixdialog.ui | 35 +++-
gtk/ui/gtkscalebutton.ui | 5 +-
tests/gdkgears.c | 6 +-
tests/popover2.ui | 15 +-
tests/testadjustsize.c | 3 +-
tests/testborderdrawing.c | 5 +-
tests/testbox.c | 15 +-
tests/testdialog.c | 5 +-
tests/testdnd2.c | 5 +-
tests/testentryicons.c | 15 +-
tests/testexpand.c | 20 ++-
tests/testfilechooserbutton.c | 5 +-
tests/testframe.c | 5 +-
tests/testgtk.c | 10 +-
tests/testheaderbar.c | 5 +-
tests/testheightforwidth.c | 5 +-
tests/testlevelbar.c | 5 +-
tests/testlist3.c | 5 +-
tests/testlogout.c | 5 +-
tests/testoutsetshadowdrawing.c | 5 +-
tests/testoverlay.c | 48 +++++-
tests/testpopover.c | 5 +-
tests/testscrolledge.c | 10 +-
tests/testselectionmode.c | 5 +-
tests/testsplitheaders.ui | 5 +-
tests/testtoolbar2.c | 6 +-
testsuite/gtk/notify.c | 1 -
108 files changed, 1153 insertions(+), 321 deletions(-)
---
diff --git a/demos/constraint-editor/constraint-editor-window.c
b/demos/constraint-editor/constraint-editor-window.c
index c4b545c2d8..6cccc0f914 100644
--- a/demos/constraint-editor/constraint-editor-window.c
+++ b/demos/constraint-editor/constraint-editor-window.c
@@ -601,7 +601,10 @@ create_widget_func (gpointer item,
g_object_bind_property (item, "name",
label, "label",
G_BINDING_DEFAULT);
- g_object_set (label, "margin", 10, NULL);
+ gtk_widget_set_margin_start (label, 10);
+ gtk_widget_set_margin_end (label, 10);
+ gtk_widget_set_margin_top (label, 10);
+ gtk_widget_set_margin_bottom (label, 10);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_widget_set_hexpand (label, TRUE);
gtk_container_add (GTK_CONTAINER (row), box);
diff --git a/demos/constraint-editor/constraint-editor.ui b/demos/constraint-editor/constraint-editor.ui
index 8d12a37758..a9054756a7 100644
--- a/demos/constraint-editor/constraint-editor.ui
+++ b/demos/constraint-editor/constraint-editor.ui
@@ -3,7 +3,10 @@
<template class="ConstraintEditor" parent="GtkWidget">
<child>
<object class="GtkGrid" id="grid">
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
<child>
diff --git a/demos/constraint-editor/guide-editor.ui b/demos/constraint-editor/guide-editor.ui
index a788de10bf..b67de17f3b 100644
--- a/demos/constraint-editor/guide-editor.ui
+++ b/demos/constraint-editor/guide-editor.ui
@@ -45,7 +45,10 @@
<template class="GuideEditor" parent="GtkWidget">
<child>
<object class="GtkGrid" id="grid">
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
<child>
diff --git a/demos/gtk-demo/assistant.c b/demos/gtk-demo/assistant.c
index 3b1405932c..7cd77c2c33 100644
--- a/demos/gtk-demo/assistant.c
+++ b/demos/gtk-demo/assistant.c
@@ -94,7 +94,10 @@ create_page1 (GtkWidget *assistant)
GtkWidget *box, *label, *entry;
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
- g_object_set (box, "margin", 12, NULL);
+ gtk_widget_set_margin_start (box, 12);
+ gtk_widget_set_margin_end (box, 12);
+ gtk_widget_set_margin_top (box, 12);
+ gtk_widget_set_margin_bottom (box, 12);
label = gtk_label_new ("You must fill out this entry to continue:");
gtk_container_add (GTK_CONTAINER (box), label);
@@ -117,7 +120,10 @@ create_page2 (GtkWidget *assistant)
GtkWidget *box, *checkbutton;
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
- g_object_set (box, "margin", 12, NULL);
+ gtk_widget_set_margin_start (box, 12);
+ gtk_widget_set_margin_end (box, 12);
+ gtk_widget_set_margin_top (box, 12);
+ gtk_widget_set_margin_bottom (box, 12);
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
"even if you do not check this");
diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c
index 525c81e2c2..9187c94641 100644
--- a/demos/gtk-demo/clipboard.c
+++ b/demos/gtk-demo/clipboard.c
@@ -284,7 +284,10 @@ 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_widget_set_margin_start (vbox, 8);
+ gtk_widget_set_margin_end (vbox, 8);
+ gtk_widget_set_margin_top (vbox, 8);
+ gtk_widget_set_margin_bottom (vbox, 8);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -293,7 +296,10 @@ do_clipboard (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (vbox), label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
- g_object_set (hbox, "margin", 8, NULL);
+ gtk_widget_set_margin_start (hbox, 8);
+ gtk_widget_set_margin_end (hbox, 8);
+ gtk_widget_set_margin_top (hbox, 8);
+ gtk_widget_set_margin_bottom (hbox, 8);
gtk_container_add (GTK_CONTAINER (vbox), hbox);
/* Create the first entry */
@@ -310,7 +316,10 @@ do_clipboard (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (vbox), label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
- g_object_set (hbox, "margin", 8, NULL);
+ gtk_widget_set_margin_start (hbox, 8);
+ gtk_widget_set_margin_end (hbox, 8);
+ gtk_widget_set_margin_top (hbox, 8);
+ gtk_widget_set_margin_bottom (hbox, 8);
gtk_container_add (GTK_CONTAINER (vbox), hbox);
/* Create the second entry */
@@ -327,7 +336,10 @@ do_clipboard (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (vbox), label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
- g_object_set (hbox, "margin", 8, NULL);
+ gtk_widget_set_margin_start (hbox, 8);
+ gtk_widget_set_margin_end (hbox, 8);
+ gtk_widget_set_margin_top (hbox, 8);
+ gtk_widget_set_margin_bottom (hbox, 8);
gtk_container_add (GTK_CONTAINER (vbox), hbox);
/* Create the first image */
diff --git a/demos/gtk-demo/colorsel.c b/demos/gtk-demo/colorsel.c
index fa19813d2e..5cab8bde9e 100644
--- a/demos/gtk-demo/colorsel.c
+++ b/demos/gtk-demo/colorsel.c
@@ -79,7 +79,10 @@ 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_widget_set_margin_start (vbox, 12);
+ gtk_widget_set_margin_end (vbox, 12);
+ gtk_widget_set_margin_top (vbox, 12);
+ gtk_widget_set_margin_bottom (vbox, 12);
gtk_container_add (GTK_CONTAINER (window), vbox);
/*
diff --git a/demos/gtk-demo/combobox.c b/demos/gtk-demo/combobox.c
index ddf849f6a8..01ec143329 100644
--- a/demos/gtk-demo/combobox.c
+++ b/demos/gtk-demo/combobox.c
@@ -319,7 +319,10 @@ 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_widget_set_margin_start (vbox, 10);
+ gtk_widget_set_margin_end (vbox, 10);
+ gtk_widget_set_margin_top (vbox, 10);
+ gtk_widget_set_margin_bottom (vbox, 10);
gtk_container_add (GTK_CONTAINER (window), vbox);
/* A combobox demonstrating cell renderers, separators and
@@ -329,7 +332,10 @@ do_combobox (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (vbox), frame);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- g_object_set (box, "margin", 5, NULL);
+ gtk_widget_set_margin_start (box, 5);
+ gtk_widget_set_margin_end (box, 5);
+ gtk_widget_set_margin_top (box, 5);
+ gtk_widget_set_margin_bottom (box, 5);
gtk_container_add (GTK_CONTAINER (frame), box);
model = create_icon_store ();
@@ -370,7 +376,10 @@ do_combobox (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (vbox), frame);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- g_object_set (box, "margin", 5, NULL);
+ gtk_widget_set_margin_start (box, 5);
+ gtk_widget_set_margin_end (box, 5);
+ gtk_widget_set_margin_top (box, 5);
+ gtk_widget_set_margin_bottom (box, 5);
gtk_container_add (GTK_CONTAINER (frame), box);
model = create_capital_store ();
@@ -398,7 +407,10 @@ do_combobox (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (vbox), frame);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- g_object_set (box, "margin", 5, NULL);
+ gtk_widget_set_margin_start (box, 5);
+ gtk_widget_set_margin_end (box, 5);
+ gtk_widget_set_margin_top (box, 5);
+ gtk_widget_set_margin_bottom (box, 5);
gtk_container_add (GTK_CONTAINER (frame), box);
combo = gtk_combo_box_text_new_with_entry ();
@@ -416,7 +428,10 @@ do_combobox (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (vbox), frame);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- g_object_set (box, "margin", 5, NULL);
+ gtk_widget_set_margin_start (box, 5);
+ gtk_widget_set_margin_end (box, 5);
+ gtk_widget_set_margin_top (box, 5);
+ gtk_widget_set_margin_bottom (box, 5);
gtk_container_add (GTK_CONTAINER (frame), box);
combo = gtk_combo_box_text_new ();
diff --git a/demos/gtk-demo/cursors.ui b/demos/gtk-demo/cursors.ui
index 4b81bd9f5a..20c868623e 100644
--- a/demos/gtk-demo/cursors.ui
+++ b/demos/gtk-demo/cursors.ui
@@ -656,7 +656,10 @@
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
- <property name="margin">60</property>
+ <property name="margin-start">60</property>
+ <property name="margin-end">60</property>
+ <property name="margin-top">60</property>
+ <property name="margin-bottom">60</property>
<property name="spacing">10</property>
<property name="halign">center</property>
<child>
@@ -672,7 +675,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -729,7 +735,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -786,7 +795,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -856,7 +868,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -913,7 +928,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -970,7 +988,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1027,7 +1048,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1084,7 +1108,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1154,7 +1181,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1211,7 +1241,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1268,7 +1301,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1325,7 +1361,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1395,7 +1434,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1452,7 +1494,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1509,7 +1554,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1566,7 +1614,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1623,7 +1674,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1680,7 +1734,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1737,7 +1794,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1807,7 +1867,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1864,7 +1927,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1921,7 +1987,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -1978,7 +2047,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -2035,7 +2107,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -2092,7 +2167,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -2149,7 +2227,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -2206,7 +2287,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -2263,7 +2347,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -2320,7 +2407,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -2377,7 +2467,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -2434,7 +2527,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -2491,7 +2587,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -2548,7 +2647,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -2605,7 +2707,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -2675,7 +2780,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
@@ -2732,7 +2840,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage">
diff --git a/demos/gtk-demo/dialog.c b/demos/gtk-demo/dialog.c
index f719dc3d18..2313b6f255 100644
--- a/demos/gtk-demo/dialog.c
+++ b/demos/gtk-demo/dialog.c
@@ -114,11 +114,17 @@ do_dialog (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
frame = gtk_frame_new ("Dialogs");
- g_object_set (frame, "margin", 8, NULL);
+ gtk_widget_set_margin_start (frame, 8);
+ gtk_widget_set_margin_end (frame, 8);
+ gtk_widget_set_margin_top (frame, 8);
+ gtk_widget_set_margin_bottom (frame, 8);
gtk_container_add (GTK_CONTAINER (window), frame);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
- g_object_set (vbox, "margin", 8, NULL);
+ gtk_widget_set_margin_start (vbox, 8);
+ gtk_widget_set_margin_end (vbox, 8);
+ gtk_widget_set_margin_top (vbox, 8);
+ gtk_widget_set_margin_bottom (vbox, 8);
gtk_container_add (GTK_CONTAINER (frame), vbox);
/* Standard message dialog */
diff --git a/demos/gtk-demo/drawingarea.c b/demos/gtk-demo/drawingarea.c
index 875c4b7feb..d16a417bc4 100644
--- a/demos/gtk-demo/drawingarea.c
+++ b/demos/gtk-demo/drawingarea.c
@@ -198,7 +198,10 @@ 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_widget_set_margin_start (vbox, 16);
+ gtk_widget_set_margin_end (vbox, 16);
+ gtk_widget_set_margin_top (vbox, 16);
+ gtk_widget_set_margin_bottom (vbox, 16);
gtk_container_add (GTK_CONTAINER (window), vbox);
/*
diff --git a/demos/gtk-demo/editable_cells.c b/demos/gtk-demo/editable_cells.c
index 05076594f7..6987165951 100644
--- a/demos/gtk-demo/editable_cells.c
+++ b/demos/gtk-demo/editable_cells.c
@@ -353,7 +353,10 @@ 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_widget_set_margin_start (vbox, 5);
+ gtk_widget_set_margin_end (vbox, 5);
+ gtk_widget_set_margin_top (vbox, 5);
+ gtk_widget_set_margin_bottom (vbox, 5);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_container_add (GTK_CONTAINER (vbox),
diff --git a/demos/gtk-demo/entry_completion.c b/demos/gtk-demo/entry_completion.c
index 3c35038d32..12549f86da 100644
--- a/demos/gtk-demo/entry_completion.c
+++ b/demos/gtk-demo/entry_completion.c
@@ -55,7 +55,10 @@ 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_widget_set_margin_start (vbox, 5);
+ gtk_widget_set_margin_end (vbox, 5);
+ gtk_widget_set_margin_top (vbox, 5);
+ gtk_widget_set_margin_bottom (vbox, 5);
gtk_container_add (GTK_CONTAINER (window), vbox);
label = gtk_label_new (NULL);
diff --git a/demos/gtk-demo/entry_undo.c b/demos/gtk-demo/entry_undo.c
index 089bc6b13c..1c8babfd3f 100644
--- a/demos/gtk-demo/entry_undo.c
+++ b/demos/gtk-demo/entry_undo.c
@@ -29,7 +29,10 @@ do_entry_undo (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_widget_set_margin_start (vbox, 5);
+ gtk_widget_set_margin_end (vbox, 5);
+ gtk_widget_set_margin_top (vbox, 5);
+ gtk_widget_set_margin_bottom (vbox, 5);
gtk_container_add (GTK_CONTAINER (window), vbox);
label = gtk_label_new (NULL);
diff --git a/demos/gtk-demo/filtermodel.ui b/demos/gtk-demo/filtermodel.ui
index aed068a197..b2d30445d9 100644
--- a/demos/gtk-demo/filtermodel.ui
+++ b/demos/gtk-demo/filtermodel.ui
@@ -31,7 +31,10 @@
<property name="title" translatable="yes">Filter Model</property>
<child>
<object class="GtkGrid" id="grid1">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
<property name="column-homogeneous">1</property>
diff --git a/demos/gtk-demo/font-features.ui b/demos/gtk-demo/font-features.ui
index d9066c6ba6..9567832a78 100644
--- a/demos/gtk-demo/font-features.ui
+++ b/demos/gtk-demo/font-features.ui
@@ -33,7 +33,10 @@
<object class="GtkViewport">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
@@ -109,7 +112,10 @@
<property name="orientation">vertical</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<property name="spacing">20</property>
<child>
<object class="GtkStack" id="stack">
diff --git a/demos/gtk-demo/glarea.c b/demos/gtk-demo/glarea.c
index 8f55301ec4..a76e17d628 100644
--- a/demos/gtk-demo/glarea.c
+++ b/demos/gtk-demo/glarea.c
@@ -396,7 +396,10 @@ 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_widget_set_margin_start (box, 12);
+ gtk_widget_set_margin_end (box, 12);
+ gtk_widget_set_margin_top (box, 12);
+ gtk_widget_set_margin_bottom (box, 12);
gtk_box_set_spacing (GTK_BOX (box), 6);
gtk_container_add (GTK_CONTAINER (window), box);
diff --git a/demos/gtk-demo/iconscroll.c b/demos/gtk-demo/iconscroll.c
index fafd51930e..e2f0edd525 100644
--- a/demos/gtk-demo/iconscroll.c
+++ b/demos/gtk-demo/iconscroll.c
@@ -52,7 +52,10 @@ populate_icons (void)
grid = gtk_grid_new ();
gtk_widget_set_halign (grid, GTK_ALIGN_CENTER);
- g_object_set (grid, "margin", 10, NULL);
+ gtk_widget_set_margin_start (grid, 10);
+ gtk_widget_set_margin_end (grid, 10);
+ gtk_widget_set_margin_top (grid, 10);
+ gtk_widget_set_margin_bottom (grid, 10);
gtk_grid_set_row_spacing (GTK_GRID (grid), 10);
gtk_grid_set_column_spacing (GTK_GRID (grid), 10);
diff --git a/demos/gtk-demo/images.c b/demos/gtk-demo/images.c
index c8e16094b1..df0f81700a 100644
--- a/demos/gtk-demo/images.c
+++ b/demos/gtk-demo/images.c
@@ -342,7 +342,10 @@ do_images (GtkWidget *do_widget)
G_CALLBACK (cleanup_callback), NULL);
base_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
- g_object_set (base_vbox, "margin", 16, NULL);
+ gtk_widget_set_margin_start (base_vbox, 16);
+ gtk_widget_set_margin_end (base_vbox, 16);
+ gtk_widget_set_margin_top (base_vbox, 16);
+ gtk_widget_set_margin_bottom (base_vbox, 16);
gtk_container_add (GTK_CONTAINER (window), base_vbox);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 16);
diff --git a/demos/gtk-demo/infobar.c b/demos/gtk-demo/infobar.c
index cdb76d83a9..3f66750025 100644
--- a/demos/gtk-demo/infobar.c
+++ b/demos/gtk-demo/infobar.c
@@ -61,7 +61,10 @@ 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_widget_set_margin_start (vbox, 8);
+ gtk_widget_set_margin_end (vbox, 8);
+ gtk_widget_set_margin_top (vbox, 8);
+ gtk_widget_set_margin_bottom (vbox, 8);
gtk_container_add (GTK_CONTAINER (window), vbox);
bar = gtk_info_bar_new ();
@@ -134,7 +137,10 @@ do_infobar (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (vbox), frame);
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
- g_object_set (vbox2, "margin", 8, NULL);
+ gtk_widget_set_margin_start (vbox2, 8);
+ gtk_widget_set_margin_end (vbox2, 8);
+ gtk_widget_set_margin_top (vbox2, 8);
+ gtk_widget_set_margin_bottom (vbox2, 8);
gtk_container_add (GTK_CONTAINER (frame), vbox2);
/* Standard message dialog */
diff --git a/demos/gtk-demo/list_store.c b/demos/gtk-demo/list_store.c
index f0e992b87b..318fcad6f1 100644
--- a/demos/gtk-demo/list_store.c
+++ b/demos/gtk-demo/list_store.c
@@ -264,7 +264,10 @@ 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_widget_set_margin_start (vbox, 8);
+ gtk_widget_set_margin_end (vbox, 8);
+ gtk_widget_set_margin_top (vbox, 8);
+ gtk_widget_set_margin_bottom (vbox, 8);
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).");
diff --git a/demos/gtk-demo/modelbutton.ui b/demos/gtk-demo/modelbutton.ui
index 5a895e4cfd..455b2d9feb 100644
--- a/demos/gtk-demo/modelbutton.ui
+++ b/demos/gtk-demo/modelbutton.ui
@@ -10,7 +10,10 @@
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
- <property name="margin">80</property>
+ <property name="margin-start">80</property>
+ <property name="margin-end">80</property>
+ <property name="margin-top">80</property>
+ <property name="margin-bottom">80</property>
<child>
<object class="GtkMenuButton">
<property name="popover">thing_a</property>
@@ -35,7 +38,10 @@
<object class="GtkPopover" id="thing_a">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkModelButton">
@@ -64,7 +70,10 @@
<object class="GtkPopover" id="thing_b">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
@@ -94,7 +103,10 @@
<object class="GtkPopover" id="thing_c">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
diff --git a/demos/gtk-demo/panes.c b/demos/gtk-demo/panes.c
index 2ed08a24fc..1c4b577ac9 100644
--- a/demos/gtk-demo/panes.c
+++ b/demos/gtk-demo/panes.c
@@ -97,7 +97,10 @@ create_pane_options (GtkPaned *paned,
child2 = gtk_paned_get_child2 (paned);
frame = gtk_frame_new (frame_label);
- g_object_set (frame, "margin", 4, NULL);
+ gtk_widget_set_margin_start (frame, 4);
+ gtk_widget_set_margin_end (frame, 4);
+ gtk_widget_set_margin_top (frame, 4);
+ gtk_widget_set_margin_bottom (frame, 4);
table = gtk_grid_new ();
gtk_container_add (GTK_CONTAINER (frame), table);
@@ -159,7 +162,10 @@ 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_widget_set_margin_start (vpaned, 5);
+ gtk_widget_set_margin_end (vpaned, 5);
+ gtk_widget_set_margin_top (vpaned, 5);
+ gtk_widget_set_margin_bottom (vpaned, 5);
gtk_container_add (GTK_CONTAINER (vbox), vpaned);
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
diff --git a/demos/gtk-demo/password_entry.c b/demos/gtk-demo/password_entry.c
index e43f650e30..caabde9599 100644
--- a/demos/gtk-demo/password_entry.c
+++ b/demos/gtk-demo/password_entry.c
@@ -49,7 +49,10 @@ do_password_entry (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- g_object_set (box, "margin", 18, NULL);
+ gtk_widget_set_margin_start (box, 18);
+ gtk_widget_set_margin_end (box, 18);
+ gtk_widget_set_margin_top (box, 18);
+ gtk_widget_set_margin_bottom (box, 18);
gtk_container_add (GTK_CONTAINER (window), box);
entry = gtk_password_entry_new ();
diff --git a/demos/gtk-demo/pickers.c b/demos/gtk-demo/pickers.c
index 0aebc46809..e17620022b 100644
--- a/demos/gtk-demo/pickers.c
+++ b/demos/gtk-demo/pickers.c
@@ -23,7 +23,10 @@ do_pickers (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
table = gtk_grid_new ();
- g_object_set (table, "margin", 20, NULL);
+ gtk_widget_set_margin_start (table, 20);
+ gtk_widget_set_margin_end (table, 20);
+ gtk_widget_set_margin_top (table, 20);
+ gtk_widget_set_margin_bottom (table, 20);
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);
diff --git a/demos/gtk-demo/popover.c b/demos/gtk-demo/popover.c
index d8e04596a7..f0ab27d255 100644
--- a/demos/gtk-demo/popover.c
+++ b/demos/gtk-demo/popover.c
@@ -26,7 +26,10 @@ create_popover (GtkWidget *parent,
gtk_widget_set_parent (popover, 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_set_margin_start (child, 6);
+ gtk_widget_set_margin_end (child, 6);
+ gtk_widget_set_margin_top (child, 6);
+ gtk_widget_set_margin_bottom (child, 6);
gtk_widget_show (child);
return popover;
@@ -136,7 +139,10 @@ do_popover (GtkWidget *do_widget)
window = gtk_window_new ();
gtk_window_set_title (GTK_WINDOW (window), "Popovers");
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 24);
- g_object_set (box, "margin", 24, NULL);
+ gtk_widget_set_margin_start (box, 24);
+ gtk_widget_set_margin_end (box, 24);
+ gtk_widget_set_margin_top (box, 24);
+ gtk_widget_set_margin_bottom (box, 24);
gtk_container_add (GTK_CONTAINER (window), box);
g_signal_connect (window, "destroy",
diff --git a/demos/gtk-demo/scale.ui b/demos/gtk-demo/scale.ui
index ff0119a623..8438570c06 100644
--- a/demos/gtk-demo/scale.ui
+++ b/demos/gtk-demo/scale.ui
@@ -24,7 +24,10 @@
<object class="GtkGrid" id="grid1">
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<child>
<object class="GtkLabel" id="label_plain">
<property name="label">Plain</property>
diff --git a/demos/gtk-demo/search_entry.c b/demos/gtk-demo/search_entry.c
index a8b9b03e6c..25154e40d1 100644
--- a/demos/gtk-demo/search_entry.c
+++ b/demos/gtk-demo/search_entry.c
@@ -258,7 +258,10 @@ 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_widget_set_margin_start (vbox, 5);
+ gtk_widget_set_margin_end (vbox, 5);
+ gtk_widget_set_margin_top (vbox, 5);
+ gtk_widget_set_margin_bottom (vbox, 5);
gtk_container_add (GTK_CONTAINER (window), vbox);
label = gtk_label_new (NULL);
diff --git a/demos/gtk-demo/shortcuts.ui b/demos/gtk-demo/shortcuts.ui
index ca8d08c5bf..36eda142bd 100644
--- a/demos/gtk-demo/shortcuts.ui
+++ b/demos/gtk-demo/shortcuts.ui
@@ -5,7 +5,10 @@
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
- <property name="margin">50</property>
+ <property name="margin-start">50</property>
+ <property name="margin-end">50</property>
+ <property name="margin-top">50</property>
+ <property name="margin-end">50</property>
<property name="spacing">10</property>
<child>
<object class="GtkButton">
diff --git a/demos/gtk-demo/sizegroup.c b/demos/gtk-demo/sizegroup.c
index 1eebdb519a..07cbba955e 100644
--- a/demos/gtk-demo/sizegroup.c
+++ b/demos/gtk-demo/sizegroup.c
@@ -108,7 +108,10 @@ 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_widget_set_margin_start (vbox, 5);
+ gtk_widget_set_margin_end (vbox, 5);
+ gtk_widget_set_margin_top (vbox, 5);
+ gtk_widget_set_margin_bottom (vbox, 5);
gtk_container_add (GTK_CONTAINER (window), vbox);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
@@ -119,7 +122,10 @@ do_sizegroup (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (vbox), frame);
table = gtk_grid_new ();
- g_object_set (table, "margin", 5, NULL);
+ gtk_widget_set_margin_start (table, 5);
+ gtk_widget_set_margin_end (table, 5);
+ gtk_widget_set_margin_top (table, 5);
+ gtk_widget_set_margin_bottom (table, 5);
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);
@@ -132,7 +138,10 @@ do_sizegroup (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (vbox), frame);
table = gtk_grid_new ();
- g_object_set (table, "margin", 5, NULL);
+ gtk_widget_set_margin_start (table, 5);
+ gtk_widget_set_margin_end (table, 5);
+ gtk_widget_set_margin_top (table, 5);
+ gtk_widget_set_margin_bottom (table, 5);
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);
diff --git a/demos/gtk-demo/sliding_puzzle.c b/demos/gtk-demo/sliding_puzzle.c
index 136c65ccfd..2f8067851b 100644
--- a/demos/gtk-demo/sliding_puzzle.c
+++ b/demos/gtk-demo/sliding_puzzle.c
@@ -421,7 +421,10 @@ do_sliding_puzzle (GtkWidget *do_widget)
tweaks = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (tweaks), 10);
gtk_grid_set_column_spacing (GTK_GRID (tweaks), 10);
- g_object_set (tweaks, "margin", 10, NULL);
+ gtk_widget_set_margin_start (tweaks, 10);
+ gtk_widget_set_margin_end (tweaks, 10);
+ gtk_widget_set_margin_top (tweaks, 10);
+ gtk_widget_set_margin_bottom (tweaks, 10);
choices = gtk_flow_box_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (choices), GTK_STYLE_CLASS_VIEW);
diff --git a/demos/gtk-demo/spinbutton.ui b/demos/gtk-demo/spinbutton.ui
index 44685f775a..8514dfdc07 100644
--- a/demos/gtk-demo/spinbutton.ui
+++ b/demos/gtk-demo/spinbutton.ui
@@ -27,7 +27,10 @@
<property name="title" translatable="yes">Spin Button</property>
<child>
<object class="GtkGrid">
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
<child>
diff --git a/demos/gtk-demo/spinner.c b/demos/gtk-demo/spinner.c
index a134c4ba63..563438a04c 100644
--- a/demos/gtk-demo/spinner.c
+++ b/demos/gtk-demo/spinner.c
@@ -52,7 +52,10 @@ 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_widget_set_margin_start (vbox, 5);
+ gtk_widget_set_margin_end (vbox, 5);
+ gtk_widget_set_margin_top (vbox, 5);
+ gtk_widget_set_margin_bottom (vbox, 5);
gtk_container_add (GTK_CONTAINER (content_area), vbox);
/* Sensitive */
diff --git a/demos/gtk-demo/tagged_entry.c b/demos/gtk-demo/tagged_entry.c
index 132724bf05..97c68d46be 100644
--- a/demos/gtk-demo/tagged_entry.c
+++ b/demos/gtk-demo/tagged_entry.c
@@ -76,7 +76,10 @@ do_tagged_entry (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- g_object_set (box, "margin", 18, NULL);
+ gtk_widget_set_margin_start (box, 18);
+ gtk_widget_set_margin_end (box, 18);
+ gtk_widget_set_margin_top (box, 18);
+ gtk_widget_set_margin_bottom (box, 18);
gtk_container_add (GTK_CONTAINER (window), box);
entry = demo_tagged_entry_new ();
diff --git a/demos/gtk-demo/themes.ui b/demos/gtk-demo/themes.ui
index 7d023658b2..40827a5928 100644
--- a/demos/gtk-demo/themes.ui
+++ b/demos/gtk-demo/themes.ui
@@ -12,7 +12,10 @@
</child>
<child>
<object class="GtkGrid" id="grid">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="row-spacing">10</property>
<property name="orientation">vertical</property>
<child>
diff --git a/demos/gtk-demo/theming.ui b/demos/gtk-demo/theming.ui
index 431dd2e3cd..c790275795 100644
--- a/demos/gtk-demo/theming.ui
+++ b/demos/gtk-demo/theming.ui
@@ -2,7 +2,10 @@
<interface>
<object class="GtkGrid" id="grid">
<property name="row-spacing">10</property>
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
diff --git a/demos/gtk-demo/transparent.c b/demos/gtk-demo/transparent.c
index 65373b8943..ae9873a4e9 100644
--- a/demos/gtk-demo/transparent.c
+++ b/demos/gtk-demo/transparent.c
@@ -33,7 +33,10 @@ do_transparent (GtkWidget *do_widget)
button = gtk_button_new_with_label ("Don't click this button!");
label = gtk_bin_get_child (GTK_BIN (button));
- g_object_set (label, "margin", 50, NULL);
+ gtk_widget_set_margin_start (label, 50);
+ gtk_widget_set_margin_end (label, 50);
+ gtk_widget_set_margin_top (label, 50);
+ gtk_widget_set_margin_bottom (label, 50);
gtk_widget_set_opacity (button, 0.7);
gtk_widget_set_halign (button, GTK_ALIGN_FILL);
@@ -43,7 +46,10 @@ do_transparent (GtkWidget *do_widget)
button = gtk_button_new_with_label ("Maybe this one?");
label = gtk_bin_get_child (GTK_BIN (button));
- g_object_set (label, "margin", 50, NULL);
+ gtk_widget_set_margin_start (label, 50);
+ gtk_widget_set_margin_end (label, 50);
+ gtk_widget_set_margin_top (label, 50);
+ gtk_widget_set_margin_bottom (label, 50);
gtk_widget_set_opacity (button, 0.7);
gtk_widget_set_halign (button, GTK_ALIGN_FILL);
diff --git a/demos/gtk-demo/tree_store.c b/demos/gtk-demo/tree_store.c
index 8123793d42..a2b8b19b44 100644
--- a/demos/gtk-demo/tree_store.c
+++ b/demos/gtk-demo/tree_store.c
@@ -398,7 +398,10 @@ 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_widget_set_margin_start (vbox, 8);
+ gtk_widget_set_margin_end (vbox, 8);
+ gtk_widget_set_margin_top (vbox, 8);
+ gtk_widget_set_margin_bottom (vbox, 8);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_container_add (GTK_CONTAINER (vbox),
diff --git a/demos/icon-browser/iconbrowserwin.c b/demos/icon-browser/iconbrowserwin.c
index 28731b6e43..471a7d1bc2 100644
--- a/demos/icon-browser/iconbrowserwin.c
+++ b/demos/icon-browser/iconbrowserwin.c
@@ -201,7 +201,10 @@ add_context (IconBrowserWindow *win,
gtk_label_set_xalign (GTK_LABEL (row), 0);
g_object_set_data (G_OBJECT (row), "context", c);
gtk_widget_show (row);
- g_object_set (row, "margin", 10, NULL);
+ gtk_widget_set_margin_start (row, 10);
+ gtk_widget_set_margin_end (row, 10);
+ gtk_widget_set_margin_top (row, 10);
+ gtk_widget_set_margin_bottom (row, 10);
gtk_list_box_insert (GTK_LIST_BOX (win->context_list), row, -1);
diff --git a/demos/icon-browser/window.ui b/demos/icon-browser/window.ui
index 95b8936f7c..16707599ba 100644
--- a/demos/icon-browser/window.ui
+++ b/demos/icon-browser/window.ui
@@ -125,7 +125,10 @@
<property name="orientation">vertical</property>
<child>
<object class="GtkGrid">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="row-spacing">18</property>
<property name="column-spacing">18</property>
<property name="halign">center</property>
@@ -376,13 +379,19 @@
<property name="label" translatable="yes">Copy to Clipboard</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<signal name="clicked" handler="copy_to_clipboard"/>
</object>
</child>
<child>
<object class="GtkLabel" id="description">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="wrap">1</property>
<property name="max-width-chars">60</property>
<property name="valign">start</property>
diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c
index 2d55e91132..3883df63a8 100644
--- a/demos/widget-factory/widget-factory.c
+++ b/demos/widget-factory/widget-factory.c
@@ -796,7 +796,10 @@ overshot (GtkScrolledWindow *sw, GtkPositionType pos, GtkWidget *widget)
"halign", GTK_ALIGN_START,
"valign", GTK_ALIGN_CENTER,
"hexpand", TRUE,
- "margin", 6,
+ "margin-start", 6,
+ "margin-end", 6,
+ "margin-top", 6,
+ "margin-bottom", 6,
"xalign", 0.0,
NULL);
gtk_container_add (GTK_CONTAINER (row), label);
@@ -806,7 +809,10 @@ overshot (GtkScrolledWindow *sw, GtkPositionType pos, GtkWidget *widget)
"selectable", FALSE,
"halign", GTK_ALIGN_END,
"valign", GTK_ALIGN_CENTER,
- "margin", 6,
+ "margin-start", 6,
+ "margin-end", 6,
+ "margin-top", 6,
+ "margin-bottom", 6,
"height-request", 24,
NULL);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -906,7 +912,10 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
g_object_set (label,
"halign", GTK_ALIGN_START,
"valign", GTK_ALIGN_CENTER,
- "margin", 6,
+ "margin-start", 6,
+ "margin-end", 6,
+ "margin-top", 6,
+ "margin-bottom", 6,
"hexpand", TRUE,
"xalign", 0.0,
NULL);
@@ -917,7 +926,10 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
"selectable", FALSE,
"halign", GTK_ALIGN_END,
"valign", GTK_ALIGN_CENTER,
- "margin", 6,
+ "margin-start", 6,
+ "margin-end", 6,
+ "margin-top", 6,
+ "margin-bottom", 6,
"height-request", 24,
NULL);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index f323237baf..fd6be0c188 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -428,7 +428,10 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<child>
<object class="GtkBox" id="box1">
<property name="orientation">vertical</property>
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<child>
<object class="GtkStack" id="toplevel_stack">
<property name="transition-duration">1000</property>
@@ -1438,7 +1441,10 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<child>
<object class="GtkBox" id="page2box">
<property name="spacing">20</property>
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<child>
<object class="GtkLabel" id="page2note">
<property name="hexpand">1</property>
@@ -1629,7 +1635,10 @@ microphone-sensitivity-medium-symbolic</property>
<property name="label" translatable="yes">Row 1</property>
<property name="halign">start</property>
<property name="valign">center</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="hexpand">1</property>
</object>
</child>
@@ -1657,7 +1666,10 @@ microphone-sensitivity-medium-symbolic</property>
<property name="label" translatable="yes">Row 2</property>
<property name="halign">start</property>
<property name="valign">center</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="hexpand">1</property>
</object>
</child>
@@ -1687,7 +1699,10 @@ microphone-sensitivity-medium-symbolic</property>
<property name="label" translatable="yes">Row 3</property>
<property name="halign">start</property>
<property name="valign">center</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="hexpand">1</property>
</object>
</child>
@@ -1716,7 +1731,10 @@ microphone-sensitivity-medium-symbolic</property>
<property name="label" translatable="yes">Row 4</property>
<property name="halign">start</property>
<property name="valign">center</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="hexpand">1</property>
</object>
</child>
@@ -1742,7 +1760,11 @@ microphone-sensitivity-medium-symbolic</property>
<property name="label" translatable="yes">Row 5</property>
<property name="halign">start</property>
<property name="valign">center</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="hexpand">1</property>
</object>
</child>
@@ -1771,7 +1793,10 @@ microphone-sensitivity-medium-symbolic</property>
<property name="label" translatable="yes">Row 6</property>
<property name="halign">start</property>
<property name="valign">center</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="hexpand">1</property>
</object>
</child>
@@ -2290,7 +2315,10 @@ microphone-sensitivity-medium-symbolic</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<property name="spacing">10</property>
<property name="halign">center</property>
<property name="valign">center</property>
@@ -2315,7 +2343,10 @@ microphone-sensitivity-medium-symbolic</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<property name="spacing">10</property>
<property name="halign">center</property>
<property name="valign">center</property>
@@ -2397,7 +2428,10 @@ microphone-sensitivity-medium-symbolic</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<property name="halign">center</property>
<property name="valign">center</property>
<style>
@@ -2429,7 +2463,10 @@ microphone-sensitivity-medium-symbolic</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<property name="halign">center</property>
<property name="valign">center</property>
<style>
@@ -2515,7 +2552,10 @@ microphone-sensitivity-medium-symbolic</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
@@ -2561,7 +2601,10 @@ microphone-sensitivity-medium-symbolic</property>
<object class="GtkBox" id="totem_like_osd">
<property name="visible">0</property>
<property name="opacity">0.9</property>
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<property name="valign">end</property>
<style>
<class name="osd"/>
@@ -2888,7 +2931,10 @@ bad things might happen.</property>
<object class="GtkBox">
<child>
<object class="GtkLabel">
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<property name="label" translatable="yes">To free the princess, you have to slay the
dragon.</property>
<accessibility>
<role type="static"/>
@@ -2927,7 +2973,10 @@ bad things might happen.</property>
<object class="GtkGrid">
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<child>
<object class="GtkLabel">
<property name="halign">end</property>
@@ -3049,7 +3098,10 @@ bad things might happen.</property>
<object class="GtkFlowBox" id="selection_flowbox">
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="min-children-per-line">3</property>
<property name="max-children-per-line">9</property>
</object>
@@ -3076,7 +3128,10 @@ bad things might happen.</property>
<object class="GtkPopover" id="open_popover">
<child>
<object class="GtkGrid">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
<child>
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index 6cf982f25d..fba3e02a0a 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -437,7 +437,13 @@ create_action_bar (void)
button = gtk_button_new_from_icon_name ("call-start-symbolic");
gtk_widget_show (button);
gtk_container_add (GTK_CONTAINER (widget), button);
- g_object_set (gtk_widget_get_parent (button), "margin", 6, "spacing", 6, NULL);
+ g_object_set (gtk_widget_get_parent (button),
+ "margin-start", 6,
+ "margin-end", 6,
+ "margin-top", 6,
+ "margin-bottom", 6,
+ "spacing", 6,
+ NULL);
gtk_widget_show (widget);
diff --git a/examples/application10/prefs.ui b/examples/application10/prefs.ui
index 90d488ef9c..9551758c8f 100644
--- a/examples/application10/prefs.ui
+++ b/examples/application10/prefs.ui
@@ -8,7 +8,10 @@
<object class="GtkBox" id="vbox">
<child>
<object class="GtkGrid" id="grid">
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="row-spacing">12</property>
<property name="column-spacing">6</property>
<child>
diff --git a/examples/application6/prefs.ui b/examples/application6/prefs.ui
index 90d488ef9c..9551758c8f 100644
--- a/examples/application6/prefs.ui
+++ b/examples/application6/prefs.ui
@@ -8,7 +8,10 @@
<object class="GtkBox" id="vbox">
<child>
<object class="GtkGrid" id="grid">
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="row-spacing">12</property>
<property name="column-spacing">6</property>
<child>
diff --git a/examples/application7/prefs.ui b/examples/application7/prefs.ui
index 90d488ef9c..9551758c8f 100644
--- a/examples/application7/prefs.ui
+++ b/examples/application7/prefs.ui
@@ -8,7 +8,10 @@
<object class="GtkBox" id="vbox">
<child>
<object class="GtkGrid" id="grid">
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="row-spacing">12</property>
<property name="column-spacing">6</property>
<child>
diff --git a/examples/application8/prefs.ui b/examples/application8/prefs.ui
index 90d488ef9c..9551758c8f 100644
--- a/examples/application8/prefs.ui
+++ b/examples/application8/prefs.ui
@@ -8,7 +8,10 @@
<object class="GtkBox" id="vbox">
<child>
<object class="GtkGrid" id="grid">
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="row-spacing">12</property>
<property name="column-spacing">6</property>
<child>
diff --git a/examples/application9/prefs.ui b/examples/application9/prefs.ui
index 90d488ef9c..9551758c8f 100644
--- a/examples/application9/prefs.ui
+++ b/examples/application9/prefs.ui
@@ -8,7 +8,10 @@
<object class="GtkBox" id="vbox">
<child>
<object class="GtkGrid" id="grid">
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="row-spacing">12</property>
<property name="column-spacing">6</property>
<child>
diff --git a/gtk/gtkcustompaperunixdialog.c b/gtk/gtkcustompaperunixdialog.c
index e13cef0f18..6ade00a41e 100644
--- a/gtk/gtkcustompaperunixdialog.c
+++ b/gtk/gtkcustompaperunixdialog.c
@@ -1009,7 +1009,10 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 18);
- g_object_set (hbox, "margin", 20, NULL);
+ gtk_widget_set_margin_start (hbox, 20);
+ gtk_widget_set_margin_end (hbox, 20);
+ gtk_widget_set_margin_top (hbox, 20);
+ gtk_widget_set_margin_bottom (hbox, 20);
gtk_container_add (GTK_CONTAINER (content_area), hbox);
gtk_widget_show (hbox);
diff --git a/gtk/gtkmenusectionbox.c b/gtk/gtkmenusectionbox.c
index 94760fdf9f..16d5061b4a 100644
--- a/gtk/gtkmenusectionbox.c
+++ b/gtk/gtkmenusectionbox.c
@@ -409,10 +409,7 @@ gtk_menu_section_box_init (GtkMenuSectionBox *box)
box->item_box = GTK_BOX (item_box);
gtk_container_add (GTK_CONTAINER (box), item_box);
gtk_widget_set_halign (GTK_WIDGET (item_box), GTK_ALIGN_FILL);
-
gtk_widget_set_halign (GTK_WIDGET (box), GTK_ALIGN_FILL);
- g_object_set (box, "margin", 0, NULL);
-
}
static void
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index e1616a1383..25c75087ef 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -88,7 +88,10 @@
* <child>
* <object class="GtkBox">
* <property name="visible">True</property>
- * <property name="margin">10</property>
+ * <property name="margin-start">10</property>
+ * <property name="margin-end">10</property>
+ * <property name="margin-top">10</property>
+ * <property name="margin-bottom">10</property>
* <child>
* <object class="GtkModelButton">
* <property name="visible">True</property>
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index 8e0eda0ac6..9a2b59cd9c 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -2426,7 +2426,10 @@ create_rename_popover (GtkPlacesSidebar *sidebar)
grid = gtk_grid_new ();
gtk_container_add (GTK_CONTAINER (popover), grid);
g_object_set (grid,
- "margin", 10,
+ "margin-start", 10,
+ "margin-end", 10,
+ "margin-top", 10,
+ "margin-bottom", 10,
"row-spacing", 6,
"column-spacing", 6,
NULL);
diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c
index cc2a733af1..878d2d0dd5 100644
--- a/gtk/gtkprintbackend.c
+++ b/gtk/gtkprintbackend.c
@@ -667,7 +667,10 @@ request_password (GtkPrintBackend *backend,
gtk_image_set_icon_size (GTK_IMAGE (icon), GTK_ICON_SIZE_LARGE);
gtk_widget_set_halign (icon, GTK_ALIGN_CENTER);
gtk_widget_set_valign (icon, GTK_ALIGN_START);
- g_object_set (icon, "margin", 12, NULL);
+ gtk_widget_set_margin_start (icon, 12);
+ gtk_widget_set_margin_end (icon, 12);
+ gtk_widget_set_margin_top (icon, 12);
+ gtk_widget_set_margin_bottom (icon, 12);
/* Right */
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
diff --git a/gtk/gtkshortcutswindow.c b/gtk/gtkshortcutswindow.c
index 2e252054a7..bfeb4346d3 100644
--- a/gtk/gtkshortcutswindow.c
+++ b/gtk/gtkshortcutswindow.c
@@ -352,7 +352,10 @@ gtk_shortcuts_window_add_section (GtkShortcutsWindow *self,
NULL);
g_object_set_data (G_OBJECT (row), "gtk-shortcuts-section", section);
label = g_object_new (GTK_TYPE_LABEL,
- "margin", 6,
+ "margin-start", 6,
+ "margin-end", 6,
+ "margin-top", 6,
+ "margin-bottom", 6,
"label", title,
"xalign", 0.5f,
NULL);
@@ -991,7 +994,10 @@ gtk_shortcuts_window_init (GtkShortcutsWindow *self)
empty = g_object_new (GTK_TYPE_GRID,
"row-spacing", 12,
- "margin", 12,
+ "margin-start", 12,
+ "margin-end", 12,
+ "margin-top", 12,
+ "margin-bottom", 12,
"hexpand", TRUE,
"vexpand", TRUE,
"halign", GTK_ALIGN_CENTER,
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index 74d11dae9b..56f748d312 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -6037,7 +6037,10 @@ gtk_text_selection_bubble_popup_show (gpointer user_data)
G_CALLBACK (show_or_hide_handles), self);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
- g_object_set (box, "margin", 10, NULL);
+ gtk_widget_set_margin_start (box, 10);
+ gtk_widget_set_margin_end (box, 10);
+ gtk_widget_set_margin_top (box, 10);
+ gtk_widget_set_margin_bottom (box, 10);
gtk_widget_show (box);
toolbar = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_add_css_class (toolbar, "linked");
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index a2ae4cdd2e..d80a94eee7 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -8858,7 +8858,10 @@ gtk_text_view_selection_bubble_popup_show (gpointer user_data)
G_CALLBACK (show_or_hide_handles), text_view);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
- g_object_set (box, "margin", 10, NULL);
+ gtk_widget_set_margin_start (box, 10);
+ gtk_widget_set_margin_end (box, 10);
+ gtk_widget_set_margin_top (box, 10);
+ gtk_widget_set_margin_bottom (box, 10);
toolbar = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_add_css_class (toolbar, "linked");
gtk_container_add (GTK_CONTAINER (priv->selection_bubble), box);
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 184c4b617b..f9e06f2356 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -550,7 +550,6 @@ enum {
PROP_MARGIN_END,
PROP_MARGIN_TOP,
PROP_MARGIN_BOTTOM,
- PROP_MARGIN,
PROP_HEXPAND,
PROP_VEXPAND,
PROP_HEXPAND_SET,
@@ -1191,20 +1190,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
0,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
- /**
- * GtkWidget:margin:
- *
- * Sets all four sides' margin at once. If read, returns max
- * margin on any side.
- */
- widget_props[PROP_MARGIN] =
- g_param_spec_int ("margin",
- P_("All Margins"),
- P_("Pixels of extra space on all four sides"),
- 0, G_MAXINT16,
- 0,
- GTK_PARAM_READWRITE);
-
/**
* GtkWidget:hexpand:
*
@@ -1845,14 +1830,6 @@ gtk_widget_set_property (GObject *object,
case PROP_MARGIN_BOTTOM:
gtk_widget_set_margin_bottom (widget, g_value_get_int (value));
break;
- case PROP_MARGIN:
- g_object_freeze_notify (G_OBJECT (widget));
- gtk_widget_set_margin_start (widget, g_value_get_int (value));
- gtk_widget_set_margin_end (widget, g_value_get_int (value));
- gtk_widget_set_margin_top (widget, g_value_get_int (value));
- gtk_widget_set_margin_bottom (widget, g_value_get_int (value));
- g_object_thaw_notify (G_OBJECT (widget));
- break;
case PROP_HEXPAND:
gtk_widget_set_hexpand (widget, g_value_get_boolean (value));
break;
@@ -1989,12 +1966,6 @@ gtk_widget_get_property (GObject *object,
case PROP_MARGIN_BOTTOM:
g_value_set_int (value, gtk_widget_get_margin_bottom (widget));
break;
- case PROP_MARGIN:
- g_value_set_int (value, MAX (MAX (priv->margin.left,
- priv->margin.right),
- MAX (priv->margin.top,
- priv->margin.bottom)));
- break;
case PROP_HEXPAND:
g_value_set_boolean (value, gtk_widget_get_hexpand (widget));
break;
diff --git a/gtk/inspector/controllers.c b/gtk/inspector/controllers.c
index deea5b866f..5f1b5735e5 100644
--- a/gtk/inspector/controllers.c
+++ b/gtk/inspector/controllers.c
@@ -123,7 +123,10 @@ create_controller_widget (gpointer item,
gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40);
gtk_container_add (GTK_CONTAINER (row), box);
- g_object_set (box, "margin", 10, NULL);
+ gtk_widget_set_margin_start (box, 10);
+ gtk_widget_set_margin_end (box, 10);
+ gtk_widget_set_margin_top (box, 10);
+ gtk_widget_set_margin_bottom (box, 10);
label = gtk_label_new (G_OBJECT_TYPE_NAME (controller));
g_object_set (label, "xalign", 0.0, NULL);
gtk_container_add (GTK_CONTAINER (box), label);
diff --git a/gtk/inspector/css-editor.ui b/gtk/inspector/css-editor.ui
index 5996ece5db..15984bc28d 100644
--- a/gtk/inspector/css-editor.ui
+++ b/gtk/inspector/css-editor.ui
@@ -23,7 +23,10 @@
<child>
<object class="GtkBox">
<property name="spacing">6</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<child>
<object class="GtkToggleButton" id="disable_button">
<property name="relief">none</property>
diff --git a/gtk/inspector/data-list.ui b/gtk/inspector/data-list.ui
index 081bbb1fc9..19549a9834 100644
--- a/gtk/inspector/data-list.ui
+++ b/gtk/inspector/data-list.ui
@@ -4,7 +4,10 @@
<child>
<object class="GtkBox">
<property name="spacing">6</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<child>
<object class="GtkToggleButton" id="show_button">
<property name="relief">none</property>
diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c
index 2489d99c86..de3d9a6670 100644
--- a/gtk/inspector/general.c
+++ b/gtk/inspector/general.c
@@ -162,8 +162,10 @@ add_check_row (GtkInspectorGeneral *gen,
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40);
g_object_set (box,
- "margin", 10,
"margin-start", 10 + indent,
+ "margin-end", 10,
+ "margin-top", 10,
+ "margin-bottom", 10,
NULL);
label = gtk_label_new (name);
@@ -202,8 +204,10 @@ add_label_row (GtkInspectorGeneral *gen,
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40);
g_object_set (box,
- "margin", 10,
"margin-start", 10 + indent,
+ "margin-end", 10,
+ "margin-top", 10,
+ "margin-bottom", 10,
NULL);
label = gtk_label_new (name);
diff --git a/gtk/inspector/general.ui b/gtk/inspector/general.ui
index 4651befc9b..e9de932fe7 100644
--- a/gtk/inspector/general.ui
+++ b/gtk/inspector/general.ui
@@ -7,7 +7,10 @@
<child>
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
- <property name="margin">60</property>
+ <property name="margin-start">60</property>
+ <property name="margin-end">60</property>
+ <property name="margin-top">60</property>
+ <property name="margin-bottom">60</property>
<property name="spacing">10</property>
<child>
<object class="GtkFrame" id="version_frame">
@@ -20,7 +23,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gtk_version_label">
@@ -47,7 +53,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gdk_backend_label">
@@ -74,7 +83,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gsk_renderer_label">
@@ -101,7 +113,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="pango_fontmap_label">
@@ -138,7 +153,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="prefix_label">
@@ -166,7 +184,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="xdg_data_home_label">
@@ -194,7 +215,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="xdg_data_dirs_label">
@@ -222,7 +246,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gtk_path_label">
@@ -250,7 +277,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gtk_exe_prefix_label">
@@ -278,7 +308,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gtk_data_prefix_label">
@@ -306,7 +339,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gsettings_schema_dir_label">
@@ -344,7 +380,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="display_label">
@@ -372,7 +411,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="display_rgba_label">
@@ -399,7 +441,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="display_composited_label">
@@ -436,7 +481,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gl_version_label">
@@ -464,7 +512,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gl_vendor_label">
@@ -502,7 +553,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="vk_device_label">
@@ -530,7 +584,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="vk_api_version_label">
@@ -558,7 +615,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="vk_driver_version_label">
diff --git a/gtk/inspector/logs.ui b/gtk/inspector/logs.ui
index 9c7affcfd0..a73ba03286 100644
--- a/gtk/inspector/logs.ui
+++ b/gtk/inspector/logs.ui
@@ -2,7 +2,10 @@
<template class="GtkInspectorLogs" parent="GtkBox">
<child>
<object class="GtkBox">
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<property name="spacing">20</property>
<property name="halign">center</property>
<property name="hexpand">1</property>
diff --git a/gtk/inspector/misc-info.ui b/gtk/inspector/misc-info.ui
index 5f1fe8efe9..9761503e23 100644
--- a/gtk/inspector/misc-info.ui
+++ b/gtk/inspector/misc-info.ui
@@ -22,7 +22,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="address_label">
@@ -49,7 +52,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="type_label">
@@ -75,7 +81,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="refcount_label">
@@ -102,7 +111,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="state_label">
@@ -129,7 +141,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="buildable_id_label">
@@ -156,7 +171,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
@@ -182,7 +200,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
@@ -208,7 +229,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
@@ -234,7 +258,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
@@ -260,7 +287,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="surface_label">
@@ -296,7 +326,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="renderer_label">
@@ -332,7 +365,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="frame_clock_label">
@@ -368,7 +404,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
@@ -395,7 +434,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
@@ -421,7 +463,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
@@ -447,7 +492,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
@@ -473,7 +521,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
@@ -501,7 +552,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
@@ -529,7 +583,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
@@ -556,7 +613,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
@@ -583,7 +643,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
@@ -610,7 +673,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index eade68bcca..cc6b6ae9cc 100644
--- a/gtk/inspector/recorder.c
+++ b/gtk/inspector/recorder.c
@@ -1133,7 +1133,11 @@ gtk_inspector_recorder_recordings_list_create_widget (gpointer item,
gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
}
- g_object_set (widget, "margin", 6, NULL); /* Seriously? g_object_set() needed for that? */
+ gtk_widget_set_margin_start (widget, 6);
+ gtk_widget_set_margin_end (widget, 6);
+ gtk_widget_set_margin_top (widget, 6);
+ gtk_widget_set_margin_bottom (widget, 6);
+
return widget;
}
@@ -1168,7 +1172,10 @@ node_property_activated (GtkTreeView *tv,
gtk_popover_set_pointing_to (GTK_POPOVER (popover), &rect);
image = gtk_image_new_from_paintable (GDK_PAINTABLE (texture));
- g_object_set (image, "margin", 20, NULL);
+ gtk_widget_set_margin_start (image, 20);
+ gtk_widget_set_margin_end (image, 20);
+ gtk_widget_set_margin_top (image, 20);
+ gtk_widget_set_margin_bottom (image, 20);
gtk_container_add (GTK_CONTAINER (popover), image);
gtk_popover_popup (GTK_POPOVER (popover));
diff --git a/gtk/inspector/recorder.ui b/gtk/inspector/recorder.ui
index e9bd32c659..54fed8871e 100644
--- a/gtk/inspector/recorder.ui
+++ b/gtk/inspector/recorder.ui
@@ -7,7 +7,10 @@
<child>
<object class="GtkBox">
<property name="spacing">6</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<child>
<object class="GtkToggleButton">
<property name="relief">none</property>
diff --git a/gtk/inspector/resource-list.ui b/gtk/inspector/resource-list.ui
index dabe1cae78..f18fac1c6d 100644
--- a/gtk/inspector/resource-list.ui
+++ b/gtk/inspector/resource-list.ui
@@ -124,7 +124,10 @@
<object class="GtkGrid" id="info_grid">
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="halign">center</property>
<child>
<object class="GtkLabel" id="name">
diff --git a/gtk/inspector/size-groups.c b/gtk/inspector/size-groups.c
index d45da94956..4aab813745 100644
--- a/gtk/inspector/size-groups.c
+++ b/gtk/inspector/size-groups.c
@@ -208,7 +208,10 @@ add_widget (GtkInspectorSizeGroups *sl,
text = g_strdup_printf ("%p (%s)", widget, g_type_name_from_instance ((GTypeInstance*)widget));
label = gtk_label_new (text);
g_free (text);
- g_object_set (label, "margin", 10, NULL);
+ gtk_widget_set_margin_start (label, 10);
+ gtk_widget_set_margin_end (label, 10);
+ gtk_widget_set_margin_top (label, 10);
+ gtk_widget_set_margin_bottom (label, 10);
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_container_add (GTK_CONTAINER (row), label);
@@ -234,13 +237,19 @@ add_size_group (GtkInspectorSizeGroups *sl,
gtk_container_add (GTK_CONTAINER (box), box2);
label = gtk_label_new (_("Mode"));
- g_object_set (label, "margin", 10, NULL);
+ gtk_widget_set_margin_start (label, 10);
+ gtk_widget_set_margin_end (label, 10);
+ gtk_widget_set_margin_top (label, 10);
+ gtk_widget_set_margin_bottom (label, 10);
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_container_add (GTK_CONTAINER (box2), label);
combo = gtk_combo_box_text_new ();
- g_object_set (combo, "margin", 10, NULL);
+ gtk_widget_set_margin_start (combo, 10);
+ gtk_widget_set_margin_end (combo, 10);
+ gtk_widget_set_margin_top (combo, 10);
+ gtk_widget_set_margin_bottom (combo, 10);
gtk_widget_set_halign (combo, GTK_ALIGN_END);
gtk_widget_set_valign (combo, GTK_ALIGN_BASELINE);
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), C_("sizegroup mode", "None"));
diff --git a/gtk/inspector/type-info.c b/gtk/inspector/type-info.c
index 6f2f8bdbc5..313cd0361e 100644
--- a/gtk/inspector/type-info.c
+++ b/gtk/inspector/type-info.c
@@ -60,7 +60,10 @@ add_row (GtkContainer *box,
NULL);
label = g_object_new (GTK_TYPE_LABEL,
- "margin", 6,
+ "margin-start", 6,
+ "margin-end", 6,
+ "margin-top", 6,
+ "margin-bottom", 6,
"label", name,
"selectable", TRUE,
"xalign", 0.0,
@@ -142,14 +145,20 @@ gtk_inspector_type_popover_init (GtkInspectorTypePopover *self)
priv->type = G_TYPE_NONE;
label = g_object_new (GTK_TYPE_LABEL,
- "margin", 12,
+ "margin-start", 12,
+ "margin-end", 12,
+ "margin-top", 12,
+ "margin-bottom", 12,
"label", "None",
NULL);
gtk_list_box_set_placeholder (GTK_LIST_BOX (priv->parents), label);
label = g_object_new (GTK_TYPE_LABEL,
- "margin", 12,
+ "margin-start", 12,
+ "margin-end", 12,
+ "margin-top", 12,
+ "margin-bottom", 12,
"label", "None",
NULL);
diff --git a/gtk/inspector/visual.ui b/gtk/inspector/visual.ui
index d052c9d68c..c6d5ba9f8b 100644
--- a/gtk/inspector/visual.ui
+++ b/gtk/inspector/visual.ui
@@ -31,7 +31,10 @@
<child>
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
- <property name="margin">60</property>
+ <property name="margin-start">60</property>
+ <property name="margin-end">60</property>
+ <property name="margin-top">60</property>
+ <property name="margin-bottom">60</property>
<property name="spacing">10</property>
<child>
<object class="GtkFrame" id="visual_frame">
@@ -47,7 +50,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="theme_label">
@@ -72,7 +78,10 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="dark_label">
@@ -98,7 +107,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="cursor_label">
@@ -124,7 +136,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="cursor_size_label">
@@ -154,7 +169,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="icon_label">
@@ -180,7 +198,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="font_label">
@@ -206,7 +227,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">20</property>
<child>
<object class="GtkLabel" id="font_scale_label">
@@ -244,7 +268,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="direction_label">
@@ -275,7 +302,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="hidpi_label">
@@ -302,7 +332,10 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="animation_label">
@@ -328,7 +361,10 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">20</property>
<child>
<object class="GtkLabel" id="slowdown_label">
@@ -377,7 +413,10 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="fps_label">
@@ -403,7 +442,10 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="updates_label">
@@ -429,7 +471,10 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="fallback_label">
@@ -455,7 +500,10 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="baselines_label">
@@ -481,7 +529,10 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="layout_label">
@@ -507,7 +558,10 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="resize_label">
@@ -533,7 +587,10 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="focus_label">
@@ -570,7 +627,10 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="touchscreen_label">
@@ -595,7 +655,10 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="software_gl_label">
diff --git a/gtk/inspector/window.ui b/gtk/inspector/window.ui
index dbf005fc62..963464be7a 100644
--- a/gtk/inspector/window.ui
+++ b/gtk/inspector/window.ui
@@ -231,7 +231,10 @@
<property name="icon-name">go-previous-symbolic</property>
<property name="tooltip-text" translatable="yes">Toggle
Sidebar</property>
<property name="relief">none</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="halign">center</property>
<property name="valign">center</property>
<signal name="clicked" handler="toggle_sidebar"/>
@@ -253,7 +256,10 @@
<property name="name">actions</property>
<property name="child">
<object class="GtkButton" id="refresh_actions_button">
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="icon-name">view-refresh-symbolic</property>
<property name="tooltip-text" translatable="yes">Refresh
action state</property>
<property name="relief">none</property>
@@ -266,7 +272,10 @@
<property name="name">magnifier</property>
<property name="child">
<object class="GtkScale">
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="width-request">150</property>
<property name="draw-value">0</property>
<property
name="adjustment">magnification_adjustment</property>
@@ -304,7 +313,10 @@
<property name="name">prop-search</property>
<property name="child">
<object class="GtkSearchEntry" id="prop_search_entry">
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="max-width-chars">40</property>
</object>
</property>
@@ -315,7 +327,10 @@
<property name="name">layout-prop-search</property>
<property name="child">
<object class="GtkSearchEntry" id="layout_prop_search_entry">
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="max-width-chars">40</property>
</object>
</property>
diff --git a/gtk/ui/gtkaboutdialog.ui b/gtk/ui/gtkaboutdialog.ui
index f4eda2ed10..0e79a5f8f0 100644
--- a/gtk/ui/gtkaboutdialog.ui
+++ b/gtk/ui/gtkaboutdialog.ui
@@ -18,12 +18,18 @@
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
- <property name="margin">5</property>
+ <property name="margin-start">5</property>
+ <property name="margin-end">5</property>
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
<child>
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
<property name="spacing">12</property>
- <property name="margin">5</property>
+ <property name="margin-start">5</property>
+ <property name="margin-end">5</property>
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
<property name="vexpand">1</property>
<child>
<object class="GtkImage" id="logo_image">
@@ -134,7 +140,10 @@
<property name="orientation">vertical</property>
<property name="row-spacing">2</property>
<property name="column-spacing">8</property>
- <property name="margin">5</property>
+ <property name="margin-start">5</property>
+ <property name="margin-end">5</property>
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
</object>
</child>
</object>
diff --git a/gtk/ui/gtkappchooserwidget.ui b/gtk/ui/gtkappchooserwidget.ui
index a87ec7b343..60241c2a89 100644
--- a/gtk/ui/gtkappchooserwidget.ui
+++ b/gtk/ui/gtkappchooserwidget.ui
@@ -88,7 +88,10 @@
<object class="GtkImage">
<property name="icon-name">application-x-executable-symbolic</property>
<property name="pixel-size">48</property>
- <property name="margin">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
<style>
<class name="dim-label"/>
</style>
diff --git a/gtk/ui/gtkassistant.ui b/gtk/ui/gtkassistant.ui
index 621906bfef..44b4260bd2 100644
--- a/gtk/ui/gtkassistant.ui
+++ b/gtk/ui/gtkassistant.ui
@@ -30,7 +30,10 @@
<object class="GtkBox" id="action_area">
<property name="halign">end</property>
<property name="spacing">6</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<child>
<object class="GtkButton" id="close">
<property name="visible">0</property>
diff --git a/gtk/ui/gtkcolorchooserdialog.ui b/gtk/ui/gtkcolorchooserdialog.ui
index 8daa0d11c0..a3e8f2a0f2 100644
--- a/gtk/ui/gtkcolorchooserdialog.ui
+++ b/gtk/ui/gtkcolorchooserdialog.ui
@@ -8,10 +8,16 @@
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
- <property name="margin">5</property>
+ <property name="margin-start">5</property>
+ <property name="margin-end">5</property>
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
<child>
<object class="GtkColorChooserWidget" id="chooser">
- <property name="margin">5</property>
+ <property name="margin-start">5</property>
+ <property name="margin-end">5</property>
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
<property name="rgba">rgb(255,255,255)</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
diff --git a/gtk/ui/gtkemojichooser.ui b/gtk/ui/gtkemojichooser.ui
index 35f335b1ba..080cf361c9 100644
--- a/gtk/ui/gtkemojichooser.ui
+++ b/gtk/ui/gtkemojichooser.ui
@@ -32,7 +32,10 @@
<child>
<object class="GtkBox" id="emoji_box">
<property name="orientation">vertical</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="spacing">6</property>
<child>
<object class="GtkFlowBox" id="recent.box">
diff --git a/gtk/ui/gtkfilechooserdialog.ui b/gtk/ui/gtkfilechooserdialog.ui
index 010e725bc9..6c2cfc1d35 100644
--- a/gtk/ui/gtkfilechooserdialog.ui
+++ b/gtk/ui/gtkfilechooserdialog.ui
@@ -9,7 +9,10 @@
<property name="orientation">vertical</property>
<child internal-child="action_area">
<object class="GtkBox" id="dialog-action_area1">
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="hexpand">1</property>
<property name="halign">end</property>
</object>
diff --git a/gtk/ui/gtkfilechooserwidget.ui b/gtk/ui/gtkfilechooserwidget.ui
index a713c09693..ff7ad061fd 100644
--- a/gtk/ui/gtkfilechooserwidget.ui
+++ b/gtk/ui/gtkfilechooserwidget.ui
@@ -48,7 +48,10 @@
<property name="child">
<object class="GtkBox">
<property name="spacing">6</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<child>
<object class="GtkPathBar" id="browse_path_bar">
<property name="hexpand">1</property>
@@ -73,7 +76,10 @@
<property name="child">
<object class="GtkBox" id="location_entry_box">
<property name="spacing">6</property>
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
</object>
</property>
</object>
@@ -83,7 +89,10 @@
<property name="name">search</property>
<property name="child">
<object class="GtkCenterBox" id="search_entry_box">
- <property name="margin">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<child type="center">
<object class="GtkSearchEntry" id="search_entry">
<property name="width-chars">45</property>
@@ -375,7 +384,10 @@
<object class="GtkPopover" id="new_folder_popover">
<child>
<object class="GtkGrid">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="column-spacing">6</property>
<property name="row-spacing">6</property>
<child>
@@ -434,7 +446,10 @@
<signal name="closed" handler="rename_file_end"/>
<child>
<object class="GtkGrid">
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<property name="row-spacing">6</property>
<property name="column-spacing">6</property>
<child>
diff --git a/gtk/ui/gtkfontchooserdialog.ui b/gtk/ui/gtkfontchooserdialog.ui
index e97b399e1f..d6f328d56b 100644
--- a/gtk/ui/gtkfontchooserdialog.ui
+++ b/gtk/ui/gtkfontchooserdialog.ui
@@ -7,7 +7,10 @@
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
- <property name="margin">5</property>
+ <property name="margin-start">5</property>
+ <property name="margin-end">5</property>
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
<child>
<object class="GtkFontChooserWidget" id="fontchooser">
<property name="vexpand">1</property>
diff --git a/gtk/ui/gtkfontchooserwidget.ui b/gtk/ui/gtkfontchooserwidget.ui
index b745aaf487..4bf228518a 100644
--- a/gtk/ui/gtkfontchooserwidget.ui
+++ b/gtk/ui/gtkfontchooserwidget.ui
@@ -251,7 +251,10 @@
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">12</property>
- <property name="margin">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
<child>
<object class="GtkGrid" id="axis_grid">
<property name="row-spacing">6</property>
diff --git a/gtk/ui/gtkpagesetupunixdialog.ui b/gtk/ui/gtkpagesetupunixdialog.ui
index 78e2c2b6e3..6d6115eadc 100644
--- a/gtk/ui/gtkpagesetupunixdialog.ui
+++ b/gtk/ui/gtkpagesetupunixdialog.ui
@@ -25,12 +25,18 @@
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
- <property name="margin">5</property>
+ <property name="margin-start">5</property>
+ <property name="margin-end">5</property>
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="row-spacing">6</property>
<property name="column-spacing">12</property>
- <property name="margin">5</property>
+ <property name="margin-start">5</property>
+ <property name="margin-end">5</property>
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
<property name="vexpand">1</property>
<child>
<object class="GtkLabel" id="printer_combo_label">
diff --git a/gtk/ui/gtkplacesview.ui b/gtk/ui/gtkplacesview.ui
index bc00c725e1..df4423cc5b 100644
--- a/gtk/ui/gtkplacesview.ui
+++ b/gtk/ui/gtkplacesview.ui
@@ -19,7 +19,10 @@
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">6</property>
- <property name="margin">18</property>
+ <property name="margin-start">18</property>
+ <property name="margin-end">18</property>
+ <property name="margin-top">18</property>
+ <property name="margin-bottom">18</property>
<child>
<object class="GtkLabel">
<property name="hexpand">1</property>
@@ -130,7 +133,10 @@
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">12</property>
- <property name="margin">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Recent Servers</property>
diff --git a/gtk/ui/gtkprintunixdialog.ui b/gtk/ui/gtkprintunixdialog.ui
index ef905ecdbf..af4bc41fc0 100644
--- a/gtk/ui/gtkprintunixdialog.ui
+++ b/gtk/ui/gtkprintunixdialog.ui
@@ -61,7 +61,10 @@
<object class="GtkBox" id="general_main_box">
<property name="orientation">vertical</property>
<property name="spacing">18</property>
- <property name="margin">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
<child>
<object class="GtkBox" id="box2">
<property name="orientation">vertical</property>
@@ -358,7 +361,10 @@
<object class="GtkBox" id="page_setup_main_box">
<property name="orientation">vertical</property>
<property name="spacing">18</property>
- <property name="margin">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
<child>
<object class="GtkBox" id="box4">
<property name="spacing">18</property>
@@ -711,7 +717,10 @@
<object class="GtkGrid" id="job_page">
<property name="row-spacing">18</property>
<property name="column-spacing">18</property>
- <property name="margin">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
<child>
<object class="GtkBox" id="frame_template5">
<property name="orientation">vertical</property>
@@ -992,7 +1001,10 @@
<object class="GtkGrid" id="image_quality_table">
<property name="row-spacing">6</property>
<property name="column-spacing">12</property>
- <property name="margin">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
</object>
</child>
</object>
@@ -1020,7 +1032,10 @@
<object class="GtkGrid" id="color_table">
<property name="row-spacing">6</property>
<property name="column-spacing">12</property>
- <property name="margin">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
</object>
</child>
</object>
@@ -1048,7 +1063,10 @@
<object class="GtkGrid" id="finishing_table">
<property name="row-spacing">6</property>
<property name="column-spacing">12</property>
- <property name="margin">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
</object>
</child>
</object>
@@ -1076,7 +1094,10 @@
<object class="GtkBox" id="advanced_vbox">
<property name="orientation">vertical</property>
<property name="spacing">18</property>
- <property name="margin">12</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">12</property>
</object>
</child>
</object>
diff --git a/gtk/ui/gtkscalebutton.ui b/gtk/ui/gtkscalebutton.ui
index 4dcdb71620..81320fdf5b 100644
--- a/gtk/ui/gtkscalebutton.ui
+++ b/gtk/ui/gtkscalebutton.ui
@@ -20,7 +20,10 @@
<child>
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
- <property name="margin">4</property>
+ <property name="margin-start">4</property>
+ <property name="margin-end">4</property>
+ <property name="margin-top">4</property>
+ <property name="margin-bottom">4</property>
<property name="spacing">4</property>
<child>
<object class="GtkButton" id="plus_button">
diff --git a/tests/gdkgears.c b/tests/gdkgears.c
index dcb31ee209..e16b24b7a9 100644
--- a/tests/gdkgears.c
+++ b/tests/gdkgears.c
@@ -135,7 +135,11 @@ main (int argc, char *argv[])
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
overlay = gtk_overlay_new ();
- g_object_set (overlay, "margin", 12, NULL);
+ gtk_widget_set_margin_start (overlay, 12);
+ gtk_widget_set_margin_end (overlay, 12);
+ gtk_widget_set_margin_top (overlay, 12);
+ gtk_widget_set_margin_bottom (overlay, 12);
+
gtk_container_add (GTK_CONTAINER (window), overlay);
gtk_widget_show (overlay);
diff --git a/tests/popover2.ui b/tests/popover2.ui
index 3a97c1fca2..bca652fa38 100644
--- a/tests/popover2.ui
+++ b/tests/popover2.ui
@@ -158,7 +158,10 @@
<object class="GtkBox">
<property name="name">submenu1</property>
<property name="orientation">vertical</property>
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
@@ -355,7 +358,10 @@
<object class="GtkBox">
<property name="name">submenu2</property>
<property name="orientation">vertical</property>
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<child>
<object class="GtkModelButton">
<property name="action-name">top.action7</property>
@@ -382,7 +388,10 @@
<object class="GtkBox">
<property name="name">subsubmenu</property>
<property name="orientation">vertical</property>
- <property name="margin">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
<child>
<object class="GtkModelButton">
<property name="action-name">action8</property>
diff --git a/tests/testadjustsize.c b/tests/testadjustsize.c
index 2b145c2a29..c286b6e13f 100644
--- a/tests/testadjustsize.c
+++ b/tests/testadjustsize.c
@@ -296,8 +296,7 @@ open_margin_window (void)
"margin-start",
"margin-end",
"margin-top",
- "margin-bottom",
- "margin"
+ "margin-bottom"
};
test_window = gtk_window_new ();
diff --git a/tests/testborderdrawing.c b/tests/testborderdrawing.c
index a9b0b2cd8e..f193ee9e3f 100644
--- a/tests/testborderdrawing.c
+++ b/tests/testborderdrawing.c
@@ -110,7 +110,10 @@ main (int argc, char **argv)
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 40);
top = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40);
bottom = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40);
- g_object_set (box, "margin", 40, NULL);
+ gtk_widget_set_margin_start (box, 40);
+ gtk_widget_set_margin_end (box, 40);
+ gtk_widget_set_margin_top (box, 40);
+ gtk_widget_set_margin_bottom (box, 40);
w = gtk_button_new ();
gtk_widget_set_valign (w, GTK_ALIGN_CENTER);
diff --git a/tests/testbox.c b/tests/testbox.c
index ccb6a827ac..db28fdd4e1 100644
--- a/tests/testbox.c
+++ b/tests/testbox.c
@@ -20,7 +20,10 @@ edit_widget (GtkWidget *button)
grid = gtk_grid_new ();
g_object_set (grid,
- "margin", 20,
+ "margin-start", 20,
+ "margin-end", 20,
+ "margin-top", 20,
+ "margin-bottom", 20,
"row-spacing", 10,
"column-spacing", 10,
NULL);
@@ -102,13 +105,19 @@ main (int argc, char *argv[])
g_object_bind_property (box, "homogeneous",
check, "active",
G_BINDING_BIDIRECTIONAL|G_BINDING_SYNC_CREATE);
- g_object_set (check, "margin", 10, NULL);
+ gtk_widget_set_margin_start (check, 10);
+ gtk_widget_set_margin_end (check, 10);
+ gtk_widget_set_margin_top (check, 10);
+ gtk_widget_set_margin_bottom (check, 10);
gtk_widget_set_halign (check, GTK_ALIGN_CENTER);
gtk_widget_show (check);
gtk_container_add (GTK_CONTAINER (vbox), check);
b = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
- g_object_set (b, "margin", 10, NULL);
+ gtk_widget_set_margin_start (b, 10);
+ gtk_widget_set_margin_end (b, 10);
+ gtk_widget_set_margin_top (b, 10);
+ gtk_widget_set_margin_bottom (b, 10);
gtk_widget_set_halign (b, GTK_ALIGN_CENTER);
label = gtk_label_new ("Spacing:");
gtk_widget_set_halign (label, GTK_ALIGN_END);
diff --git a/tests/testdialog.c b/tests/testdialog.c
index c627f73f2d..d53874e3b6 100644
--- a/tests/testdialog.c
+++ b/tests/testdialog.c
@@ -95,7 +95,10 @@ add_content (GtkWidget *dialog)
GtkWidget *label;
label = gtk_label_new ("content");
- g_object_set (label, "margin", 50, NULL);
+ gtk_widget_set_margin_start (label, 50);
+ gtk_widget_set_margin_end (label, 50);
+ gtk_widget_set_margin_top (label, 50);
+ gtk_widget_set_margin_bottom (label, 50);
gtk_widget_show (label);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), label);
diff --git a/tests/testdnd2.c b/tests/testdnd2.c
index 4438e3a1d4..17b1abcbbb 100644
--- a/tests/testdnd2.c
+++ b/tests/testdnd2.c
@@ -408,7 +408,10 @@ main (int argc, char *Argv[])
grid = gtk_grid_new ();
g_object_set (grid,
- "margin", 20,
+ "margin-start", 20,
+ "margin-end", 20,
+ "margin-top", 20,
+ "margin-bottom", 20,
"row-spacing", 20,
"column-spacing", 20,
NULL);
diff --git a/tests/testentryicons.c b/tests/testentryicons.c
index 14d3cb6b5d..9c571a1168 100644
--- a/tests/testentryicons.c
+++ b/tests/testentryicons.c
@@ -114,7 +114,10 @@ main (int argc, char **argv)
gtk_container_add (GTK_CONTAINER (window), grid);
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
- g_object_set (grid, "margin", 10, NULL);
+ gtk_widget_set_margin_start (grid, 10);
+ gtk_widget_set_margin_end (grid, 10);
+ gtk_widget_set_margin_top (grid, 10);
+ gtk_widget_set_margin_bottom (grid, 10);
/*
* Open File - Sets the icon using a GIcon
@@ -274,7 +277,10 @@ main (int argc, char **argv)
gtk_container_add (GTK_CONTAINER (box), entry);
image = gtk_image_new_from_icon_name ("edit-find-symbolic");
gtk_widget_set_cursor_from_name (image, "default");
- g_object_set (image, "margin", 6, NULL);
+ gtk_widget_set_margin_start (image, 6);
+ gtk_widget_set_margin_end (image, 6);
+ gtk_widget_set_margin_top (image, 6);
+ gtk_widget_set_margin_bottom (image, 6);
gtk_widget_set_tooltip_text (image, "Click me");
GtkGesture *gesture;
@@ -283,7 +289,10 @@ main (int argc, char **argv)
gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (gesture));
gtk_container_add (GTK_CONTAINER (box), image);
image = gtk_image_new_from_icon_name ("document-save-symbolic");
- g_object_set (image, "margin", 6, NULL);
+ gtk_widget_set_margin_start (image, 6);
+ gtk_widget_set_margin_end (image, 6);
+ gtk_widget_set_margin_top (image, 6);
+ gtk_widget_set_margin_bottom (image, 6);
gtk_container_add (GTK_CONTAINER (box), image);
gtk_grid_attach (GTK_GRID (grid), box, 1, 7, 1, 1);
diff --git a/tests/testexpand.c b/tests/testexpand.c
index de69040484..4f57d09254 100644
--- a/tests/testexpand.c
+++ b/tests/testexpand.c
@@ -75,7 +75,10 @@ create_box_window (void)
toggle = gtk_toggle_button_new_with_label ("H Expand");
gtk_widget_set_halign (toggle, GTK_ALIGN_CENTER);
gtk_widget_set_valign (toggle, GTK_ALIGN_CENTER);
- g_object_set (toggle, "margin", 5, NULL);
+ gtk_widget_set_margin_start (toggle, 5);
+ gtk_widget_set_margin_end (toggle, 5);
+ gtk_widget_set_margin_top (toggle, 5);
+ gtk_widget_set_margin_bottom (toggle, 5);
g_signal_connect (G_OBJECT (toggle), "toggled",
G_CALLBACK (on_toggle_hexpand), NULL);
gtk_container_add (GTK_CONTAINER (colorbox), toggle);
@@ -87,7 +90,10 @@ create_box_window (void)
toggle = gtk_toggle_button_new_with_label ("V Expand");
gtk_widget_set_halign (toggle, GTK_ALIGN_CENTER);
gtk_widget_set_valign (toggle, GTK_ALIGN_CENTER);
- g_object_set (toggle, "margin", 5, NULL);
+ gtk_widget_set_margin_start (toggle, 5);
+ gtk_widget_set_margin_end (toggle, 5);
+ gtk_widget_set_margin_top (toggle, 5);
+ gtk_widget_set_margin_bottom (toggle, 5);
g_signal_connect (G_OBJECT (toggle), "toggled",
G_CALLBACK (on_toggle_vexpand), NULL);
gtk_container_add (GTK_CONTAINER (colorbox), toggle);
@@ -122,7 +128,10 @@ create_grid_window (void)
toggle = gtk_toggle_button_new_with_label ("H Expand");
gtk_widget_set_halign (toggle, GTK_ALIGN_CENTER);
gtk_widget_set_valign (toggle, GTK_ALIGN_CENTER);
- g_object_set (toggle, "margin", 5, NULL);
+ gtk_widget_set_margin_start (toggle, 5);
+ gtk_widget_set_margin_end (toggle, 5);
+ gtk_widget_set_margin_top (toggle, 5);
+ gtk_widget_set_margin_bottom (toggle, 5);
g_signal_connect (G_OBJECT (toggle), "toggled",
G_CALLBACK (on_toggle_hexpand), NULL);
gtk_container_add (GTK_CONTAINER (colorbox), toggle);
@@ -134,7 +143,10 @@ create_grid_window (void)
toggle = gtk_toggle_button_new_with_label ("V Expand");
gtk_widget_set_halign (toggle, GTK_ALIGN_CENTER);
gtk_widget_set_valign (toggle, GTK_ALIGN_CENTER);
- g_object_set (toggle, "margin", 5, NULL);
+ gtk_widget_set_margin_start (toggle, 5);
+ gtk_widget_set_margin_end (toggle, 5);
+ gtk_widget_set_margin_top (toggle, 5);
+ gtk_widget_set_margin_bottom (toggle, 5);
g_signal_connect (G_OBJECT (toggle), "toggled",
G_CALLBACK (on_toggle_vexpand), NULL);
gtk_container_add (GTK_CONTAINER (colorbox), toggle);
diff --git a/tests/testfilechooserbutton.c b/tests/testfilechooserbutton.c
index 7809cd06fc..2113fa65ea 100644
--- a/tests/testfilechooserbutton.c
+++ b/tests/testfilechooserbutton.c
@@ -304,7 +304,10 @@ main (int argc,
g_signal_connect (win, "response", G_CALLBACK (quit_cb), &done);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
- g_object_set (vbox, "margin", 6, NULL);
+ gtk_widget_set_margin_start (vbox, 6);
+ gtk_widget_set_margin_end (vbox, 6);
+ gtk_widget_set_margin_top (vbox, 6);
+ gtk_widget_set_margin_bottom (vbox, 6);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (win))), vbox);
frame = gtk_frame_new ("<b>GtkFileChooserButton</b>");
diff --git a/tests/testframe.c b/tests/testframe.c
index c943997440..e7ea521c40 100644
--- a/tests/testframe.c
+++ b/tests/testframe.c
@@ -153,7 +153,10 @@ int main (int argc, char **argv)
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
vbox = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 5));
- g_object_set (vbox, "margin", 12, NULL);
+ gtk_widget_set_margin_start (vbox, 12);
+ gtk_widget_set_margin_end (vbox, 12);
+ gtk_widget_set_margin_top (vbox, 12);
+ gtk_widget_set_margin_bottom (vbox, 12);
gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (vbox));
frame = GTK_FRAME (gtk_frame_new ("Test GtkFrame"));
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 3c06592a6a..77fa65e7f0 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -3415,7 +3415,10 @@ dialog_response_cb (GtkWidget *widget, gint response, gpointer unused)
GtkWidget *label;
label = gtk_label_new ("Dialog Test");
- g_object_set (label, "margin", 10, NULL);
+ gtk_widget_set_margin_start (label, 10);
+ gtk_widget_set_margin_end (label, 10);
+ gtk_widget_set_margin_top (label, 10);
+ gtk_widget_set_margin_bottom (label, 10);
gtk_container_add (GTK_CONTAINER (content_area),
label);
gtk_widget_show (label);
@@ -5650,7 +5653,10 @@ create_timeout_test (GtkWidget *widget)
gtk_window_set_title (GTK_WINDOW (window), "Timeout Test");
label = gtk_label_new ("count: 0");
- g_object_set (label, "margin", 10, NULL);
+ gtk_widget_set_margin_start (label, 10);
+ gtk_widget_set_margin_end (label, 10);
+ gtk_widget_set_margin_top (label, 10);
+ gtk_widget_set_margin_bottom (label, 10);
gtk_container_add (GTK_CONTAINER (content_area), label);
gtk_widget_show (label);
diff --git a/tests/testheaderbar.c b/tests/testheaderbar.c
index 5cd92fb0f7..386475d216 100644
--- a/tests/testheaderbar.c
+++ b/tests/testheaderbar.c
@@ -96,7 +96,10 @@ change_header (GtkButton *button, gpointer data)
header = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_style_context_add_class (gtk_widget_get_style_context (header), "titlebar");
gtk_style_context_add_class (gtk_widget_get_style_context (header), "header-bar");
- g_object_set (header, "margin", 10, NULL);
+ gtk_widget_set_margin_start (header, 10);
+ gtk_widget_set_margin_end (header, 10);
+ gtk_widget_set_margin_top (header, 10);
+ gtk_widget_set_margin_bottom (header, 10);
label = gtk_label_new ("Label");
gtk_container_add (GTK_CONTAINER (header), label);
widget = gtk_level_bar_new ();
diff --git a/tests/testheightforwidth.c b/tests/testheightforwidth.c
index 6239831960..ae4ae9cc13 100644
--- a/tests/testheightforwidth.c
+++ b/tests/testheightforwidth.c
@@ -811,7 +811,10 @@ create_window (void)
window = gtk_window_new ();
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- g_object_set (vbox, "margin", 8, NULL);
+ gtk_widget_set_margin_start (vbox, 8);
+ gtk_widget_set_margin_end (vbox, 8);
+ gtk_widget_set_margin_top (vbox, 8);
+ gtk_widget_set_margin_bottom (vbox, 8);
gtk_container_add (GTK_CONTAINER (window), vbox);
diff --git a/tests/testlevelbar.c b/tests/testlevelbar.c
index ffe6710784..0d9cb34d44 100644
--- a/tests/testlevelbar.c
+++ b/tests/testlevelbar.c
@@ -92,7 +92,10 @@ main (int argc, char *argv[])
window = gtk_window_new ();
gtk_window_set_default_size (GTK_WINDOW (window), 500, 100);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
- g_object_set (box, "margin", 20, NULL);
+ gtk_widget_set_margin_start (box, 20);
+ gtk_widget_set_margin_end (box, 20);
+ gtk_widget_set_margin_top (box, 20);
+ gtk_widget_set_margin_bottom (box, 20);
bar = create_level_bar ();
gtk_container_add (GTK_CONTAINER (window), box);
gtk_container_add (GTK_CONTAINER (box), bar);
diff --git a/tests/testlist3.c b/tests/testlist3.c
index 72dcc2db28..1e2825de2b 100644
--- a/tests/testlist3.c
+++ b/tests/testlist3.c
@@ -158,7 +158,10 @@ main (int argc, char *argv[])
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_container_add (GTK_CONTAINER (window), hbox);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- g_object_set (vbox, "margin", 12, NULL);
+ gtk_widget_set_margin_start (vbox, 12);
+ gtk_widget_set_margin_end (vbox, 12);
+ gtk_widget_set_margin_top (vbox, 12);
+ gtk_widget_set_margin_bottom (vbox, 12);
gtk_container_add (GTK_CONTAINER (hbox), vbox);
list = gtk_list_box_new ();
diff --git a/tests/testlogout.c b/tests/testlogout.c
index f0435cad7d..e028c0d0fd 100644
--- a/tests/testlogout.c
+++ b/tests/testlogout.c
@@ -82,7 +82,10 @@ activate (GtkApplication *app,
win = gtk_window_new ();
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
- g_object_set (box, "margin", 12, NULL);
+ gtk_widget_set_margin_start (box, 12);
+ gtk_widget_set_margin_end (box, 12);
+ gtk_widget_set_margin_top (box, 12);
+ gtk_widget_set_margin_bottom (box, 12);
gtk_container_add (GTK_CONTAINER (win), box);
grid = gtk_grid_new ();
diff --git a/tests/testoutsetshadowdrawing.c b/tests/testoutsetshadowdrawing.c
index 6f221375cc..3b27b9c8a1 100644
--- a/tests/testoutsetshadowdrawing.c
+++ b/tests/testoutsetshadowdrawing.c
@@ -108,7 +108,10 @@ main (int argc, char **argv)
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 120);
top = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 120);
bottom = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 120);
- g_object_set (box, "margin", 120, NULL);
+ gtk_widget_set_margin_start (box, 120);
+ gtk_widget_set_margin_end (box, 120);
+ gtk_widget_set_margin_top (box, 120);
+ gtk_widget_set_margin_bottom (box, 120);
w = gtk_button_new ();
gtk_widget_set_valign (w, GTK_ALIGN_CENTER);
diff --git a/tests/testoverlay.c b/tests/testoverlay.c
index ea84ab96d2..62823b4122 100644
--- a/tests/testoverlay.c
+++ b/tests/testoverlay.c
@@ -45,7 +45,11 @@ test_nonzerox (void)
gtk_window_set_title (GTK_WINDOW (win), "Non-zero X");
grid = gtk_grid_new ();
- g_object_set (grid, "margin", 5, NULL);
+ gtk_widget_set_margin_start (grid, 5);
+ gtk_widget_set_margin_end (grid, 5);
+ gtk_widget_set_margin_top (grid, 5);
+ gtk_widget_set_margin_bottom (grid, 5);
+
gtk_container_add (GTK_CONTAINER (win), grid);
gtk_grid_attach (GTK_GRID (grid), gtk_label_new ("Above"), 1, 0, 1, 1);
gtk_grid_attach (GTK_GRID (grid), gtk_label_new ("Below"), 1, 2, 1, 1);
@@ -64,14 +68,22 @@ test_nonzerox (void)
child = gtk_label_new ("I'm the overlay");
gtk_widget_set_halign (child, GTK_ALIGN_START);
gtk_widget_set_valign (child, GTK_ALIGN_START);
- g_object_set (child, "margin", 3, NULL);
+ gtk_widget_set_margin_start (child, 3);
+ gtk_widget_set_margin_end (child, 3);
+ gtk_widget_set_margin_top (child, 3);
+ gtk_widget_set_margin_bottom (child, 3);
+
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), child);
child = gtk_label_new ("No, I'm the overlay");
gtk_widget_set_halign (child, GTK_ALIGN_END);
gtk_widget_set_valign (child, GTK_ALIGN_END);
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), child);
- g_object_set (child, "margin", 3, NULL);
+ gtk_widget_set_margin_start (child, 3);
+ gtk_widget_set_margin_end (child, 3);
+ gtk_widget_set_margin_top (child, 3);
+ gtk_widget_set_margin_bottom (child, 3);
+
return win;
}
@@ -135,7 +147,10 @@ test_relative (void)
text = gtk_text_view_new ();
gtk_widget_set_size_request (text, 200, 200);
- g_object_set (text, "margin", 5, NULL);
+ gtk_widget_set_margin_start (text, 5);
+ gtk_widget_set_margin_end (text, 5);
+ gtk_widget_set_margin_top (text, 5);
+ gtk_widget_set_margin_bottom (text, 5);
gtk_widget_set_hexpand (text, TRUE);
gtk_widget_set_vexpand (text, TRUE);
gtk_grid_attach (GTK_GRID (grid), text, 1, 1, 1, 1);
@@ -146,13 +161,19 @@ test_relative (void)
gtk_widget_set_halign (child, GTK_ALIGN_START);
gtk_widget_set_valign (child, GTK_ALIGN_START);
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), child);
- g_object_set (child, "margin", 1, NULL);
+ gtk_widget_set_margin_start (child, 1);
+ gtk_widget_set_margin_end (child, 1);
+ gtk_widget_set_margin_top (child, 1);
+ gtk_widget_set_margin_bottom (child, 1);
child = gtk_label_new ("Bottom right overlay");
gtk_widget_set_halign (child, GTK_ALIGN_END);
gtk_widget_set_valign (child, GTK_ALIGN_END);
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), child);
- g_object_set (child, "margin", 1, NULL);
+ gtk_widget_set_margin_start (child, 1);
+ gtk_widget_set_margin_end (child, 1);
+ gtk_widget_set_margin_top (child, 1);
+ gtk_widget_set_margin_bottom (child, 1);
return win;
}
@@ -182,7 +203,10 @@ test_fullwidth (void)
gtk_widget_set_halign (child, GTK_ALIGN_FILL);
gtk_widget_set_valign (child, GTK_ALIGN_START);
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), child);
- g_object_set (child, "margin", 4, NULL);
+ gtk_widget_set_margin_start (child, 4);
+ gtk_widget_set_margin_end (child, 4);
+ gtk_widget_set_margin_top (child, 4);
+ gtk_widget_set_margin_bottom (child, 4);
return win;
}
@@ -230,7 +254,10 @@ test_scrolling (void)
gtk_widget_set_halign (child, GTK_ALIGN_CENTER);
gtk_widget_set_valign (child, GTK_ALIGN_END);
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), child);
- g_object_set (child, "margin", 4, NULL);
+ gtk_widget_set_margin_start (child, 4);
+ gtk_widget_set_margin_end (child, 4);
+ gtk_widget_set_margin_top (child, 4);
+ gtk_widget_set_margin_bottom (child, 4);
return win;
}
@@ -373,7 +400,10 @@ test_chase (void)
gtk_widget_set_halign (child, GTK_ALIGN_START);
gtk_widget_set_valign (child, GTK_ALIGN_END);
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), child);
- g_object_set (child, "margin", 4, NULL);
+ gtk_widget_set_margin_start (child, 4);
+ gtk_widget_set_margin_end (child, 4);
+ gtk_widget_set_margin_top (child, 4);
+ gtk_widget_set_margin_bottom (child, 4);
controller = gtk_event_controller_motion_new ();
g_signal_connect (controller, "enter", G_CALLBACK (on_enter), overlay);
diff --git a/tests/testpopover.c b/tests/testpopover.c
index 310280fec6..a18c5f4459 100644
--- a/tests/testpopover.c
+++ b/tests/testpopover.c
@@ -123,7 +123,10 @@ main (int argc, char *argv[])
popover2 = (GtkWidget *)gtk_builder_get_object (builder, "popover");
gtk_menu_button_set_popover (GTK_MENU_BUTTON (button2), popover2);
- g_object_set (box, "margin", 10, NULL);
+ gtk_widget_set_margin_start (box, 10);
+ gtk_widget_set_margin_end (box, 10);
+ gtk_widget_set_margin_top (box, 10);
+ gtk_widget_set_margin_bottom (box, 10);
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), box);
label = gtk_label_new ("Popover hexpand");
diff --git a/tests/testscrolledge.c b/tests/testscrolledge.c
index 2d76eb8f0d..23663bf520 100644
--- a/tests/testscrolledge.c
+++ b/tests/testscrolledge.c
@@ -40,7 +40,10 @@ populate_list (GtkListBox *list)
label = gtk_label_new (text);
g_free (text);
- g_object_set (label, "margin", 10, NULL);
+ gtk_widget_set_margin_start (label, 10);
+ gtk_widget_set_margin_end (label, 10);
+ gtk_widget_set_margin_top (label, 10);
+ gtk_widget_set_margin_bottom (label, 10);
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_container_add (GTK_CONTAINER (row), label);
gtk_container_add (GTK_CONTAINER (list), row);
@@ -105,7 +108,10 @@ main (int argc, char *argv[])
popup = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_widget_set_halign (popup, GTK_ALIGN_CENTER);
gtk_widget_set_valign (popup, GTK_ALIGN_END);
- g_object_set (popup, "margin", 40, NULL);
+ gtk_widget_set_margin_start (popup, 40);
+ gtk_widget_set_margin_end (popup, 40);
+ gtk_widget_set_margin_top (popup, 40);
+ gtk_widget_set_margin_bottom (popup, 40);
label = gtk_label_new ("Getting more rows...");
spinner = gtk_spinner_new ();
gtk_container_add (GTK_CONTAINER (popup), label);
diff --git a/tests/testselectionmode.c b/tests/testselectionmode.c
index f496409e30..53fc020dc4 100644
--- a/tests/testselectionmode.c
+++ b/tests/testselectionmode.c
@@ -21,7 +21,10 @@ selectable_row_init (SelectableRow *row)
row->revealer = gtk_revealer_new ();
gtk_revealer_set_transition_type (GTK_REVEALER (row->revealer), GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
row->check = gtk_check_button_new ();
- g_object_set (row->check, "margin", 10, NULL);
+ gtk_widget_set_margin_start (row->check, 10);
+ gtk_widget_set_margin_end (row->check, 10);
+ gtk_widget_set_margin_top (row->check, 10);
+ gtk_widget_set_margin_bottom (row->check, 10);
gtk_widget_show (row->box);
gtk_widget_show (row->check);
diff --git a/tests/testsplitheaders.ui b/tests/testsplitheaders.ui
index 512c22fdca..631194c35a 100644
--- a/tests/testsplitheaders.ui
+++ b/tests/testsplitheaders.ui
@@ -85,7 +85,10 @@
<property name="vscrollbar-policy">always</property>
<child>
<object class="GtkGrid">
- <property name="margin">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
<child>
diff --git a/tests/testtoolbar2.c b/tests/testtoolbar2.c
index f17880c44e..1007b77150 100644
--- a/tests/testtoolbar2.c
+++ b/tests/testtoolbar2.c
@@ -21,7 +21,11 @@ int main (int argc, char *argv[])
gtk_widget_set_vexpand (view, TRUE);
gtk_container_add (GTK_CONTAINER (box), view);
box3 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
- g_object_set (box3, "margin", 10, NULL);
+ gtk_widget_set_margin_start (box3, 10);
+ gtk_widget_set_margin_end (box3, 10);
+ gtk_widget_set_margin_top (box3, 10);
+ gtk_widget_set_margin_bottom (box3, 10);
+
gtk_style_context_add_class (gtk_widget_get_style_context (box3), GTK_STYLE_CLASS_LINKED);
button = gtk_button_new_from_icon_name ("document-new-symbolic");
gtk_container_add (GTK_CONTAINER (box3), button);
diff --git a/testsuite/gtk/notify.c b/testsuite/gtk/notify.c
index 9b6dabac93..d1b1f71bd2 100644
--- a/testsuite/gtk/notify.c
+++ b/testsuite/gtk/notify.c
@@ -495,7 +495,6 @@ test_type (gconstpointer data)
(g_str_equal (pspec->name, "has-focus") ||
g_str_equal (pspec->name, "has-default") ||
g_str_equal (pspec->name, "is-focus") ||
- g_str_equal (pspec->name, "margin") ||
g_str_equal (pspec->name, "hexpand") ||
g_str_equal (pspec->name, "vexpand")))
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]