[nautilus/wip/antoniof/gtk4-preparation-miscellaneous: 44/49] general: Stop setting GtkWidget:margin
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/gtk4-preparation-miscellaneous: 44/49] general: Stop setting GtkWidget:margin
- Date: Tue, 9 Nov 2021 00:21:22 +0000 (UTC)
commit 81e575460a2f70799554d6b197554cd5edefeaea
Author: António Fernandes <antoniof gnome org>
Date: Sun Oct 17 15:15:17 2021 +0100
general: Stop setting GtkWidget:margin
This is also gone in GTK4, so we should set the margin for all 4 sides.
In batch-rename-dialog.ui there is a case where :margin was set to 0,
which is the default, so just remove the tag in that case.
src/nautilus-file-conflict-dialog.c | 7 ++++++-
src/nautilus-files-view.c | 13 ++++++++++---
src/resources/ui/nautilus-batch-rename-dialog.ui | 6 ++++--
.../nautilus-file-properties-change-permissions.ui | 5 ++++-
src/resources/ui/nautilus-properties-window.ui | 20 ++++++++++++++++----
src/resources/ui/nautilus-search-popover.ui | 5 ++++-
src/resources/ui/nautilus-toolbar.ui | 5 ++++-
7 files changed, 48 insertions(+), 13 deletions(-)
---
diff --git a/src/nautilus-file-conflict-dialog.c b/src/nautilus-file-conflict-dialog.c
index edc328967..2fb401fb2 100644
--- a/src/nautilus-file-conflict-dialog.c
+++ b/src/nautilus-file-conflict-dialog.c
@@ -369,7 +369,12 @@ nautilus_file_conflict_dialog_init (NautilusFileConflictDialog *fcd)
gtk_widget_grab_focus (fcd->replace_button);
/* Setup HIG properties */
- g_object_set (dialog_area, "margin", 18, NULL);
+ g_object_set (dialog_area,
+ "margin-top", 18,
+ "margin-bottom", 18,
+ "margin-start", 18,
+ "margin-end", 18,
+ NULL);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_widget_show_all (dialog_area);
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 7d32557f3..4a5f13ee7 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1799,8 +1799,12 @@ select_pattern (NautilusFilesView *view)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_box_set_spacing (GTK_BOX (content_area), 2);
- g_object_set (content_area, "margin", 18, NULL);
-
+ g_object_set (content_area,
+ "margin-top", 18,
+ "margin-bottom", 18,
+ "margin-start", 18,
+ "margin-end", 18,
+ NULL);
label = gtk_label_new_with_mnemonic (_("_Pattern:"));
gtk_widget_set_halign (label, GTK_ALIGN_START);
@@ -1819,7 +1823,10 @@ select_pattern (NautilusFilesView *view)
grid = gtk_grid_new ();
g_object_set (grid,
"orientation", GTK_ORIENTATION_VERTICAL,
- "margin", 6,
+ "margin-top", 6,
+ "margin-bottom", 6,
+ "margin-start", 6,
+ "margin-end", 6,
"row-spacing", 6,
"column-spacing", 12,
NULL);
diff --git a/src/resources/ui/nautilus-batch-rename-dialog.ui
b/src/resources/ui/nautilus-batch-rename-dialog.ui
index 850458266..025628d9a 100644
--- a/src/resources/ui/nautilus-batch-rename-dialog.ui
+++ b/src/resources/ui/nautilus-batch-rename-dialog.ui
@@ -35,7 +35,6 @@
<child>
<object class="GtkGrid" id="grid">
<property name="visible">True</property>
- <property name="margin">0</property>
<property name="row-spacing">6</property>
<property name="column-spacing">6</property>
<property name="hexpand">True</property>
@@ -48,7 +47,10 @@
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="halign">center</property>
- <property name="margin">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
<child>
<object class="GtkRadioButton" id="format_mode_button">
<property name="label" translatable="yes">Rename _using a template</property>
diff --git a/src/resources/ui/nautilus-file-properties-change-permissions.ui
b/src/resources/ui/nautilus-file-properties-change-permissions.ui
index a35214c76..820df23f0 100644
--- a/src/resources/ui/nautilus-file-properties-change-permissions.ui
+++ b/src/resources/ui/nautilus-file-properties-change-permissions.ui
@@ -33,7 +33,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
- <property name="margin">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
<property name="orientation">vertical</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
diff --git a/src/resources/ui/nautilus-properties-window.ui b/src/resources/ui/nautilus-properties-window.ui
index 5ad7171a1..81dcabc1a 100644
--- a/src/resources/ui/nautilus-properties-window.ui
+++ b/src/resources/ui/nautilus-properties-window.ui
@@ -29,7 +29,10 @@
<object class="GtkBox" id="basic_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin">18</property>
+ <property name="margin-top">18</property>
+ <property name="margin-bottom">18</property>
+ <property name="margin-start">18</property>
+ <property name="margin-end">18</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
@@ -478,7 +481,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">False</property>
- <property name="margin">5</property>
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
+ <property name="margin-start">5</property>
+ <property name="margin-end">5</property>
<property name="row_spacing">10</property>
<property name="column_spacing">10</property>
<child>
@@ -763,7 +769,10 @@
<child>
<object class="GtkBox" id="permissions_box">
<property name="can_focus">False</property>
- <property name="margin">18</property>
+ <property name="margin-top">18</property>
+ <property name="margin-bottom">18</property>
+ <property name="margin-start">18</property>
+ <property name="margin-end">18</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="not_the_owner_label">
@@ -1273,7 +1282,10 @@
<child>
<object class="GtkBox" id="open_with_box">
<property name="can_focus">False</property>
- <property name="margin">18</property>
+ <property name="margin-top">18</property>
+ <property name="margin-bottom">18</property>
+ <property name="margin-start">18</property>
+ <property name="margin-end">18</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
diff --git a/src/resources/ui/nautilus-search-popover.ui b/src/resources/ui/nautilus-search-popover.ui
index c4fad1e18..14bab0fd3 100644
--- a/src/resources/ui/nautilus-search-popover.ui
+++ b/src/resources/ui/nautilus-search-popover.ui
@@ -8,7 +8,10 @@
<object class="GtkGrid" >
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
<property name="row_spacing">8</property>
<property name="column_spacing">18</property>
<child>
diff --git a/src/resources/ui/nautilus-toolbar.ui b/src/resources/ui/nautilus-toolbar.ui
index ce91bcb2f..d012fa827 100644
--- a/src/resources/ui/nautilus-toolbar.ui
+++ b/src/resources/ui/nautilus-toolbar.ui
@@ -312,7 +312,10 @@
<property name="width_request">160</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin">9</property>
+ <property name="margin-top">9</property>
+ <property name="margin-bottom">9</property>
+ <property name="margin-start">9</property>
+ <property name="margin-end">9</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="view_menu_zoom_section">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]