[gnome-software/1520-os-updates-off-center-progress-bar] gs-upgrade-banner: Center download progress bar



commit 3bdb8a19dd835873e81854ef5b7ba40a6cc513ee
Author: Milan Crha <mcrha redhat com>
Date:   Wed Oct 27 16:08:16 2021 +0200

    gs-upgrade-banner: Center download progress bar
    
    Make sure the spacer is of the same size as the cancel button,
    with the same margin, thus the middle part is centered in the dialog.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1520

 src/gs-upgrade-banner.c  | 2 --
 src/gs-upgrade-banner.ui | 9 +++++++++
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-upgrade-banner.c b/src/gs-upgrade-banner.c
index 8baf484cc..cae7a3404 100644
--- a/src/gs-upgrade-banner.c
+++ b/src/gs-upgrade-banner.c
@@ -29,7 +29,6 @@ typedef struct
        GtkWidget       *label_upgrades_summary;
        GtkWidget       *label_upgrades_title;
        GtkWidget       *label_download_info;
-       GtkWidget       *label_upgrades_downloading_spacer;
        GtkWidget       *label_upgrades_downloading;
        GtkWidget       *progressbar;
        guint            progress_pulse_id;
@@ -345,7 +344,6 @@ gs_upgrade_banner_class_init (GsUpgradeBannerClass *klass)
        gtk_widget_class_bind_template_child_private (widget_class, GsUpgradeBanner, label_upgrades_title);
        gtk_widget_class_bind_template_child_private (widget_class, GsUpgradeBanner, label_download_info);
        gtk_widget_class_bind_template_child_private (widget_class, GsUpgradeBanner, 
label_upgrades_downloading);
-       gtk_widget_class_bind_template_child_private (widget_class, GsUpgradeBanner, 
label_upgrades_downloading_spacer);
        gtk_widget_class_bind_template_child_private (widget_class, GsUpgradeBanner, progressbar);
 }
 
diff --git a/src/gs-upgrade-banner.ui b/src/gs-upgrade-banner.ui
index 4aff55962..33d389d28 100644
--- a/src/gs-upgrade-banner.ui
+++ b/src/gs-upgrade-banner.ui
@@ -114,6 +114,8 @@
                   <object class="GtkLabel" id="label_upgrades_downloading_spacer">
                     <property name="label"></property> <!-- space-taker -->
                     <property name="halign">start</property>
+                    <property name="margin-start">2</property>
+                    <property name="margin-end">2</property>
                   </object>
                 </child>
                 <child>
@@ -217,4 +219,11 @@
       </object>
     </child>
   </template>
+  <object class="GtkSizeGroup">
+    <property name="mode">horizontal</property>
+    <widgets>
+      <widget name="label_upgrades_downloading_spacer"/>
+      <widget name="button_upgrades_cancel"/>
+    </widgets>
+  </object>
 </interface>


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