[gnome-software: 7/18] review-row: Make it a box of boxes




commit 3e785c902638ff62fd145737b589d17fe3ba4e21
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Aug 10 14:35:29 2021 +0200

    review-row: Make it a box of boxes
    
    This fixes some oddities with how GtkGrid works. This leaves the
    indentation broken for ease of review, it will be fixed in the next
    commit.

 src/gs-review-row.ui | 73 +++++++++++++++++-----------------------------------
 1 file changed, 23 insertions(+), 50 deletions(-)
---
diff --git a/src/gs-review-row.ui b/src/gs-review-row.ui
index 3ed3c4e60..341cf9501 100644
--- a/src/gs-review-row.ui
+++ b/src/gs-review-row.ui
@@ -8,13 +8,25 @@
       <class name="review-row"/>
     </style>
     <child>
-      <object class="GtkGrid" id="grid">
+      <object class="GtkBox">
         <property name="visible">True</property>
+        <property name="orientation">vertical</property>
         <property name="margin_top">32</property>
-        <property name="row_spacing">6</property>
-        <property name="column_spacing">10</property>
+        <property name="spacing">6</property>
         <property name="hexpand">True</property>
         <property name="vexpand">True</property>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="spacing">10</property>
+            <property name="hexpand">True</property>
+        <child>
+          <object class="GsStarWidget" id="stars">
+            <property name="visible">True</property>
+            <property name="halign">start</property>
+            <property name="sensitive">False</property>
+          </object>
+        </child>
         <child>
           <object class="GtkLabel" id="summary_label">
             <property name="visible">True</property>
@@ -27,10 +39,6 @@
               <class name="review-summary"/>
             </style>
           </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkLabel" id="date_label">
@@ -43,10 +51,8 @@
               <class name="dim-label"/>
             </style>
           </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">0</property>
-          </packing>
+        </child>
+          </object>
         </child>
         <child>
           <object class="GtkLabel" id="author_label">
@@ -58,11 +64,6 @@
               <class name="dim-label"/>
             </style>
           </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">1</property>
-            <property name="width">3</property>
-          </packing>
         </child>
         <child>
           <object class="GtkLabel" id="text_label">
@@ -77,28 +78,11 @@
             <property name="wrap-mode">word-char</property>
             <property name="selectable">True</property>
           </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">2</property>
-            <property name="width">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GsStarWidget" id="stars">
-            <property name="visible">True</property>
-            <property name="halign">start</property>
-            <property name="sensitive">False</property>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkBox" id="box_voting">
             <property name="visible">True</property>
             <property name="spacing">9</property>
-            <property name="halign">start</property>
             <child>
               <object class="GtkLabel">
                 <property name="visible">True</property>
@@ -112,7 +96,6 @@
               <object class="GtkBox" id="box_vote_buttons">
                 <property name="visible">True</property>
                 <property name="spacing">0</property>
-                <property name="halign">start</property>
                 <style>
                   <class name="vote-buttons"/>
                 </style>
@@ -145,18 +128,6 @@
                 </child>
               </object>
             </child>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">3</property>
-            <property name="width">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkBox" id="box_action_buttons">
-            <property name="visible">True</property>
-            <property name="spacing">9</property>
-            <property name="halign">end</property>
             <child>
               <object class="GtkButton" id="button_report">
                 <property name="label" translatable="yes">Report…</property>
@@ -166,6 +137,9 @@
                 <property name="halign">end</property>
                 <property name="relief">none</property>
               </object>
+              <packing>
+                <property name="pack_type">end</property>
+              </packing>
             </child>
             <child>
               <object class="GtkButton" id="button_remove">
@@ -176,12 +150,11 @@
                 <property name="halign">end</property>
                 <property name="relief">none</property>
               </object>
+              <packing>
+                <property name="pack_type">end</property>
+              </packing>
             </child>
           </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">3</property>
-          </packing>
         </child>
       </object>
     </child>


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