[gnome-software/1872-source-chooser-button-is-too-narrow-when-app-is-installed] gs-details-page: Improve packing of the action buttons



commit ce9f87a9ec990a75b9e1d62bf8a1efacad71b528
Author: Milan Crha <mcrha redhat com>
Date:   Thu Aug 25 15:12:19 2022 +0200

    gs-details-page: Improve packing of the action buttons
    
    Better align action buttons with the origin combo box.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1872

 src/gs-details-page.c  |  2 +-
 src/gs-details-page.ui | 23 +++++++++++++++--------
 2 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index cb34b655d..5b507f5a6 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -2514,7 +2514,7 @@ narrow_to_halign (GBinding *binding, const GValue *from_value, GValue *to_value,
        if (g_value_get_boolean (from_value))
                g_value_set_enum (to_value, GTK_ALIGN_START);
        else
-               g_value_set_enum (to_value, GTK_ALIGN_FILL);
+               g_value_set_enum (to_value, GTK_ALIGN_END);
 
        return TRUE;
 }
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index 6e12e0a1b..419f74b27 100644
--- a/src/gs-details-page.ui
+++ b/src/gs-details-page.ui
@@ -213,6 +213,7 @@
                                         <child>
                                           <object class="GtkBox" id="box_with_source">
                                             <property name="orientation">vertical</property>
+                                            <property name="halign">end</property>
                                             <property name="valign">center</property>
                                             <property name="margin-top">6</property>
                                             <property name="spacing">6</property>
@@ -229,7 +230,8 @@
                                                     <property name="width_request">105</property>
                                                     <property name="can_focus">True</property>
                                                     <property name="receives_default">True</property>
-                                                    <property name="halign">start</property>
+                                                    <property name="halign">fill</property>
+                                                    <property name="hexpand">True</property>
                                                     <property name="valign">center</property>
                                                     <signal name="clicked" 
handler="gs_details_page_app_install_button_cb"/>
                                                     <style>
@@ -243,6 +245,9 @@
                                                     <!-- TRANSLATORS: A label for a button to execute the 
selected application. -->
                                                     <property name="label" 
translatable="yes">_Open</property>
                                                     <property name="use_underline">True</property>
+                                                    <property name="width_request">105</property>
+                                                    <property name="halign">fill</property>
+                                                    <property name="hexpand">True</property>
                                                     <property name="valign">center</property>
                                                     <signal name="clicked" 
handler="gs_details_page_app_launch_button_cb"/>
                                                     <style>
@@ -258,7 +263,8 @@
                                                     <property name="width_request">105</property>
                                                     <property name="can_focus">True</property>
                                                     <property name="receives_default">True</property>
-                                                    <property name="halign">start</property>
+                                                    <property name="halign">fill</property>
+                                                    <property name="hexpand">True</property>
                                                     <property name="valign">center</property>
                                                     <signal name="clicked" 
handler="gs_details_page_app_update_button_cb"/>
                                                   </object>
@@ -268,7 +274,8 @@
                                                     <property name="visible">False</property>
                                                     <property name="can_focus">True</property>
                                                     <property name="receives_default">True</property>
-                                                    <property name="halign">start</property>
+                                                    <property name="halign">center</property>
+                                                    <property name="hexpand">True</property>
                                                     <property name="valign">center</property>
                                                     <signal name="clicked" 
handler="gs_details_page_app_remove_button_cb"/>
                                                     <child>
@@ -286,6 +293,9 @@
                                                   <object class="GtkCenterBox">
                                                     <property name="visible" bind-source="button_cancel" 
bind-property="visible" bind-flags="sync-create"/>
                                                     <property name="orientation">vertical</property>
+                                                    <property name="width_request">105</property>
+                                                    <property name="halign">center</property>
+                                                    <property name="hexpand">True</property>
                                                     <property name="valign">center</property>
                                                     <child type="center">
                                                       <object class="GsProgressButton" id="button_cancel">
@@ -1054,12 +1064,9 @@
       </object>
     </child>
   </template>
-  <object class="GtkSizeGroup" id="sizegroup_install_remove">
+  <object class="GtkSizeGroup" id="sizegroup_origin_button">
     <widgets>
-      <widget name="button_install"/>
-      <widget name="button_cancel"/>
-      <widget name="button_update"/>
-      <widget name="button_details_launch"/>
+      <widget name="box_install_remove"/>
       <widget name="origin_button"/>
     </widgets>
   </object>


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