[epiphany/wip/exalm/gtk4-cleanups-3: 1/4] Stop using GtkWidget:margin




commit 082cdb96cf224411efbd3c871d6a22cd3efd82ec
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Dec 2 04:11:15 2021 +0500

    Stop using GtkWidget:margin
    
    GTK4 removes it and leaves margin-top etc. Use them directly.

 lib/ephy-notification.c                            | 9 +++++----
 lib/widgets/ephy-security-popover.c                | 5 ++++-
 src/resources/gtk/webapp-additional-urls-dialog.ui | 5 ++++-
 3 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/lib/ephy-notification.c b/lib/ephy-notification.c
index 6f017326c..43746bab3 100644
--- a/lib/ephy-notification.c
+++ b/lib/ephy-notification.c
@@ -146,10 +146,11 @@ ephy_notification_init (EphyNotification *self)
   gtk_grid_attach (GTK_GRID (self->grid), self->body, 0, 1, 1, 1);
 
   self->close_button = gtk_button_new ();
-  g_object_set (self->close_button,
-                "focus-on-click", FALSE,
-                "margin", 6,
-                NULL);
+  gtk_widget_set_focus_on_click (self->close_button, FALSE);
+  gtk_widget_set_margin_top (self->close_button, 6);
+  gtk_widget_set_margin_bottom (self->close_button, 6);
+  gtk_widget_set_margin_start (self->close_button, 6);
+  gtk_widget_set_margin_end (self->close_button, 6);
   gtk_style_context_add_class (gtk_widget_get_style_context (self->close_button), "flat");
   gtk_grid_attach (GTK_GRID (self->grid), self->close_button, 1, 0, 1, 2);
 
diff --git a/lib/widgets/ephy-security-popover.c b/lib/widgets/ephy-security-popover.c
index f1be1a4dd..b9632c05c 100644
--- a/lib/widgets/ephy-security-popover.c
+++ b/lib/widgets/ephy-security-popover.c
@@ -534,7 +534,10 @@ ephy_security_popover_init (EphySecurityPopover *popover)
   popover->grid = gtk_grid_new ();
   gtk_grid_set_column_spacing (GTK_GRID (popover->grid), 12);
   gtk_grid_set_row_spacing (GTK_GRID (popover->grid), 6);
-  g_object_set (popover->grid, "margin", 10, NULL);
+  gtk_widget_set_margin_top (popover->grid, 10);
+  gtk_widget_set_margin_bottom (popover->grid, 10);
+  gtk_widget_set_margin_start (popover->grid, 10);
+  gtk_widget_set_margin_end (popover->grid, 10);
 
   box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
   gtk_widget_set_halign (box, GTK_ALIGN_CENTER);
diff --git a/src/resources/gtk/webapp-additional-urls-dialog.ui 
b/src/resources/gtk/webapp-additional-urls-dialog.ui
index 8eeae0995..a0aaa7649 100644
--- a/src/resources/gtk/webapp-additional-urls-dialog.ui
+++ b/src/resources/gtk/webapp-additional-urls-dialog.ui
@@ -21,7 +21,10 @@
           <object class="GtkLabel">
             <property name="visible">True</property>
             <property name="xalign">0</property>
-            <property name="margin">12</property>
+            <property name="margin-top">12</property>
+            <property name="margin-bottom">12</property>
+            <property name="margin-start">12</property>
+            <property name="margin-end">12</property>
             <property name="label" translatable="yes">A URL that starts with any of the additional URLs will 
be opened by the web application. If you omit the URL scheme, the one from the currently loaded URL will be 
used.</property>
             <property name="wrap">True</property>
           </object>


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