[gnome-software: 2/14] gs-details-page: Use an icon on the uninstall button




commit 2106c9d52c9285d7b86ae0f4d5131e2a516f3058
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed Aug 11 17:18:31 2021 +0100

    gs-details-page: Use an icon on the uninstall button
    
    As per the new designs: 
https://gitlab.gnome.org/Teams/Design/software-mockups/-/blob/master/adaptive/app-page-install-flow.png
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1351

 src/gs-details-page.c  |  2 --
 src/gs-details-page.ui | 16 ++++++++++++----
 2 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 7bcdf6535..576ab33fb 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -950,8 +950,6 @@ gs_details_page_refresh_buttons (GsDetailsPage *self)
                                gtk_style_context_remove_class (gtk_widget_get_style_context 
(self->button_remove), "destructive-action");
                        else
                                gtk_style_context_add_class (gtk_widget_get_style_context 
(self->button_remove), "destructive-action");
-                       /* TRANSLATORS: button text in the header when an application can be erased */
-                       gtk_button_set_label (GTK_BUTTON (self->button_remove), _("_Uninstall"));
                        break;
                case GS_APP_STATE_AVAILABLE_LOCAL:
                case GS_APP_STATE_AVAILABLE:
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index d077a20af..5c56dca62 100644
--- a/src/gs-details-page.ui
+++ b/src/gs-details-page.ui
@@ -261,13 +261,22 @@
                                         <child>
                                           <object class="GtkButton" id="button_remove">
                                             <property name="visible">False</property>
-                                            <property name="use_underline">True</property>
-                                            <property name="label" translatable="yes">_Uninstall</property>
-                                            <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="valign">center</property>
+                                            <child>
+                                              <object class="GtkImage">
+                                                <property name="icon-name">user-trash-symbolic</property>
+                                                <property name="visible">True</property>
+                                              </object>
+                                            </child>
+                                            <child internal-child="accessible">
+                                              <object class="AtkObject">
+                                                <!-- TRANSLATORS: button text in the header when an 
application can be erased -->
+                                                <property name="accessible-name" 
translatable="yes">Uninstall</property>
+                                              </object>
+                                            </child>
                                           </object>
                                         </child>
                                         <child>
@@ -1018,7 +1027,6 @@
     <widgets>
       <widget name="button_install"/>
       <widget name="button_update"/>
-      <widget name="button_remove"/>
       <widget name="button_details_launch"/>
     </widgets>
   </object>


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