[gnome-software: 15/29] gs-updates-page: Fix margins and spacing across page




commit 930151b3c85540bfcd3430ffeadba9dd4e69c132
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Feb 4 00:07:30 2021 +0000

    gs-updates-page: Fix margins and spacing across page
    
    Previously there was no margin on the page itself, so when rendered in a
    narrow container, the borders of the updates sections would have no
    margin.
    
    The top margin of the page was previously provided by the top margin of
    the topmost updates section. The bottom margin was provided separately
    and didn’t match. Rework that so that the page’s margin is set at the
    page level, and the spacing is set to separate the sections from each
    other.
    
    This makes the updates page behave more like the installed apps page for
    margins.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 src/gs-updates-page.ui   | 4 ++--
 src/gs-updates-section.c | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-updates-page.ui b/src/gs-updates-page.ui
index 64bbe68f6..48619a87c 100644
--- a/src/gs-updates-page.ui
+++ b/src/gs-updates-page.ui
@@ -114,6 +114,7 @@
                   <object class="GsFixedSizeBin" id="gs_fixed_bin">
                     <property name="visible">True</property>
                     <property name="preferred-width">860</property>
+                    <property name="border-width">24</property>
                     <child>
                       <object class="GtkBox" id="list_box_updates_box">
                         <property name="visible">True</property>
@@ -123,14 +124,13 @@
                             <property name="visible">False</property>
                             <property name="hexpand">True</property>
                             <property name="vexpand">False</property>
-                            <property name="margin_top">18</property>
                           </object>
                         </child>
                         <child>
                           <object class="GtkBox" id="updates_box">
                             <property name="visible">True</property>
                             <property name="orientation">vertical</property>
-                            <property name="margin_bottom">18</property>
+                            <property name="spacing">24</property>
                           </object>
                         </child>
                       </object>
diff --git a/src/gs-updates-section.c b/src/gs-updates-section.c
index f925b1fbe..1c43e8864 100644
--- a/src/gs-updates-section.c
+++ b/src/gs-updates-section.c
@@ -651,7 +651,6 @@ gs_updates_section_init (GsUpdatesSection *self)
                                      self, NULL);
        g_signal_connect (self, "row-activated",
                          G_CALLBACK (_app_row_activated_cb), self);
-       gtk_widget_set_margin_top (GTK_WIDGET (self), 24);
 
        /* make rounded edges */
        context = gtk_widget_get_style_context (GTK_WIDGET (self));


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