[nautilus/wip/antoniof/gtk4-preparation-step-properties-cleanup: 61/66] general: Stop setting GtkWidget:margin




commit 1a2372919aca3fd392d6a286e82b624d1d5a8d13
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.

 src/nautilus-file-conflict-dialog.c                  |  7 ++++++-
 src/nautilus-files-view.c                            | 13 ++++++++++---
 src/nautilus-list-view.c                             |  7 ++++++-
 src/resources/ui/nautilus-batch-rename-dialog.ui     | 10 ++++++++--
 .../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 ++++-
 8 files changed, 58 insertions(+), 14 deletions(-)
---
diff --git a/src/nautilus-file-conflict-dialog.c b/src/nautilus-file-conflict-dialog.c
index d9750ae66..9f662c68d 100644
--- a/src/nautilus-file-conflict-dialog.c
+++ b/src/nautilus-file-conflict-dialog.c
@@ -380,7 +380,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 f2f825caa..781ab5978 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1796,8 +1796,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);
 
@@ -1816,7 +1820,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/nautilus-list-view.c b/src/nautilus-list-view.c
index 07e15dce5..9e4916c0b 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -3423,7 +3423,12 @@ create_column_editor (NautilusListView *view)
     gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);
 
     box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
-    g_object_set (box, "margin", 12, NULL);
+    g_object_set (box,
+                  "margin-top", 12,
+                  "margin-bottom", 12,
+                  "margin-start", 12,
+                  "margin-end", 12,
+                  NULL);
     gtk_widget_set_hexpand (box, TRUE);
     gtk_widget_set_vexpand (box, TRUE);
     gtk_widget_show (box);
diff --git a/src/resources/ui/nautilus-batch-rename-dialog.ui 
b/src/resources/ui/nautilus-batch-rename-dialog.ui
index 850458266..953c57d84 100644
--- a/src/resources/ui/nautilus-batch-rename-dialog.ui
+++ b/src/resources/ui/nautilus-batch-rename-dialog.ui
@@ -35,7 +35,10 @@
         <child>
           <object class="GtkGrid" id="grid">
             <property name="visible">True</property>
-            <property name="margin">0</property>
+            <property name="margin-top">0</property>
+            <property name="margin-bottom">0</property>
+            <property name="margin-start">0</property>
+            <property name="margin-end">0</property>
             <property name="row-spacing">6</property>
             <property name="column-spacing">6</property>
             <property name="hexpand">True</property>
@@ -48,7 +51,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]