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




commit f4757ffb790fd1adee7ff0421e5dc1462c2daa80
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 4e57ae61e..f2f825caa 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1776,6 +1776,7 @@ static void
 select_pattern (NautilusFilesView *view)
 {
     GtkWidget *dialog;
+    GtkWidget *content_area;
     GtkWidget *label;
     GtkWidget *example;
     GtkWidget *grid;
@@ -1792,8 +1793,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);
@@ -1813,7 +1816,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]