[nautilus/wip/antoniof/gtk4-preparation-step-properties-cleanup: 2/9] files-view: Set 18px margin on Pattern match dialog




commit 0e5f5049bc1e9d15e99957926fbb5f5d0ee5ed38
Author: António Fernandes <antoniof gnome org>
Date:   Sun Jan 24 03:09:28 2021 +0000

    files-view: Set 18px margin on Pattern match dialog
    
    As per HIG.
    
    Also, use margin on the content area, not GtkContainer:border-width.
    This is going to help with porting to GTK4.

 src/nautilus-files-view.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index f63cb4b88..7d32557f3 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1779,6 +1779,7 @@ static void
 select_pattern (NautilusFilesView *view)
 {
     GtkWidget *dialog;
+    GtkWidget *content_area;
     GtkWidget *label;
     GtkWidget *example;
     GtkWidget *grid;
@@ -1795,8 +1796,10 @@ select_pattern (NautilusFilesView *view)
                                           NULL);
     gtk_dialog_set_default_response (GTK_DIALOG (dialog),
                                      GTK_RESPONSE_OK);
-    gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-    gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 2);
+
+    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);
 
     label = gtk_label_new_with_mnemonic (_("_Pattern:"));
     gtk_widget_set_halign (label, GTK_ALIGN_START);
@@ -1816,7 +1819,7 @@ select_pattern (NautilusFilesView *view)
     grid = gtk_grid_new ();
     g_object_set (grid,
                   "orientation", GTK_ORIENTATION_VERTICAL,
-                  "border-width", 6,
+                  "margin", 6,
                   "row-spacing", 6,
                   "column-spacing", 12,
                   NULL);


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