[gnome-software/gnome-42: 1/2] gs-review-row: Fix visibility of ‘Remove’ button for user’s reviews




commit 3e7c404b965dad25d1244943990c338ece5e671d
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu May 19 10:53:17 2022 +0100

    gs-review-row: Fix visibility of ‘Remove’ button for user’s reviews
    
    The ‘Remove’ button is supposed to be shown for any review the current
    user has written. Unfortunately, it was being hidden due to the
    `box_voting` box which contains it being hidden when the upvote/downvote
    buttons are hidden.
    
    Fix that by adding another box around `box_voting` and moving the Remove
    and Report buttons up a level into the new box, so they aren’t hidden
    when `box_voting` is.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 src/gs-review-row.ui | 76 ++++++++++++++++++++++++++++------------------------
 1 file changed, 41 insertions(+), 35 deletions(-)
---
diff --git a/src/gs-review-row.ui b/src/gs-review-row.ui
index 89a236d20..e0d1aca2a 100644
--- a/src/gs-review-row.ui
+++ b/src/gs-review-row.ui
@@ -72,47 +72,53 @@
           </object>
         </child>
         <child>
-          <object class="GtkBox" id="box_voting">
-            <property name="visible">False</property>
+          <object class="GtkBox">
+            <property name="visible">True</property>
             <property name="spacing">9</property>
             <child>
-              <object class="GtkLabel">
-                <property name="label" translatable="yes" comments="Translators: Users can express their 
opinions about other users&apos; opinions about the apps.">Was this review useful to you?</property>
-                <property name="wrap">True</property>
-                <property name="xalign">0</property>
-                <style>
-                  <class name="dim-label"/>
-                </style>
-              </object>
-            </child>
-            <child>
-              <object class="GtkBox" id="box_vote_buttons">
-                <property name="spacing">0</property>
-                <style>
-                  <class name="vote-buttons"/>
-                </style>
-                <child>
-                  <object class="GtkButton" id="button_yes">
-                    <property name="label" translatable="yes">Yes</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="has-frame">False</property>
-                  </object>
-                </child>
+              <object class="GtkBox" id="box_voting">
+                <property name="visible">False</property>
+                <property name="spacing">9</property>
                 <child>
-                  <object class="GtkButton" id="button_no">
-                    <property name="label" translatable="yes">No</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="has-frame">False</property>
+                  <object class="GtkLabel">
+                    <property name="label" translatable="yes" comments="Translators: Users can express their 
opinions about other users&apos; opinions about the apps.">Was this review useful to you?</property>
+                    <property name="wrap">True</property>
+                    <property name="xalign">0</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
                   </object>
                 </child>
                 <child>
-                  <object class="GtkButton" id="button_dismiss">
-                    <property name="label" translatable="yes" comments="Translators: Button text for 
indifference, only used when moderating">Meh</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="has-frame">False</property>
+                  <object class="GtkBox" id="box_vote_buttons">
+                    <property name="spacing">0</property>
+                    <style>
+                      <class name="vote-buttons"/>
+                    </style>
+                    <child>
+                      <object class="GtkButton" id="button_yes">
+                        <property name="label" translatable="yes">Yes</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="has-frame">False</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="button_no">
+                        <property name="label" translatable="yes">No</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="has-frame">False</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="button_dismiss">
+                        <property name="label" translatable="yes" comments="Translators: Button text for 
indifference, only used when moderating">Meh</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="has-frame">False</property>
+                      </object>
+                    </child>
                   </object>
                 </child>
               </object>


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