[gnome-calculator] math-converter: Put the children in order



commit 82f528f5af46f022c5e53a8a08c01f71542b0970
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Mon Mar 22 09:32:07 2021 +0100

    math-converter: Put the children in order
    
    This allows to use child-order-dependant CSS properties the intended
    way.

 src/ui/math-converter.ui | 58 ++++++++++++++++++------------------------------
 1 file changed, 21 insertions(+), 37 deletions(-)
---
diff --git a/src/ui/math-converter.ui b/src/ui/math-converter.ui
index 167448fb..c194b4e9 100644
--- a/src/ui/math-converter.ui
+++ b/src/ui/math-converter.ui
@@ -8,19 +8,20 @@
     <property name="row_spacing">6</property>
     <property name="column_spacing">6</property>
     <child>
-      <object class="GtkButton" id="swap_button">
-        <property name="label">⇆</property>
+      <object class="GtkComboBox" id="from_combo">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="receives_default">False</property>
-        <property name="tooltip_text" translatable="yes">Switch conversion units</property>
-        <property name="relief">none</property>
-        <signal name="clicked" handler="swap_button_clicked_cb" swapped="no"/>
+        <property name="hexpand">True</property>
+        <signal name="changed" handler="from_combobox_changed_cb" swapped="no"/>
+        <child>
+          <object class="GtkCellRendererText" id="from_renderer">
+            <property name="ellipsize">end</property>
+          </object>
+          <attributes>
+            <attribute name="text">0</attribute>
+          </attributes>
+        </child>
       </object>
-      <packing>
-        <property name="left_attach">3</property>
-        <property name="top_attach">0</property>
-      </packing>
     </child>
     <child>
       <object class="GtkButton" id="in_button">
@@ -32,19 +33,16 @@
           <class name="flat"/>
         </style>
       </object>
-      <packing>
-        <property name="left_attach">1</property>
-        <property name="top_attach">0</property>
-      </packing>
     </child>
     <child>
-      <object class="GtkComboBox" id="from_combo">
+      <object class="GtkComboBox" id="to_combo">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="opacity">0.88</property>
         <property name="hexpand">True</property>
-        <signal name="changed" handler="from_combobox_changed_cb" swapped="no"/>
+        <signal name="changed" handler="to_combobox_changed_cb" swapped="no"/>
         <child>
-          <object class="GtkCellRendererText" id="from_renderer">
+          <object class="GtkCellRendererText" id="to_renderer">
             <property name="ellipsize">end</property>
           </object>
           <attributes>
@@ -52,31 +50,17 @@
           </attributes>
         </child>
       </object>
-      <packing>
-        <property name="left_attach">0</property>
-        <property name="top_attach">0</property>
-      </packing>
     </child>
     <child>
-      <object class="GtkComboBox" id="to_combo">
+      <object class="GtkButton" id="swap_button">
+        <property name="label">⇆</property>
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="opacity">0.88</property>
-        <property name="hexpand">True</property>
-        <signal name="changed" handler="to_combobox_changed_cb" swapped="no"/>
-        <child>
-          <object class="GtkCellRendererText" id="to_renderer">
-            <property name="ellipsize">end</property>
-          </object>
-          <attributes>
-            <attribute name="text">0</attribute>
-          </attributes>
-        </child>
+        <property name="receives_default">False</property>
+        <property name="tooltip_text" translatable="yes">Switch conversion units</property>
+        <property name="relief">none</property>
+        <signal name="clicked" handler="swap_button_clicked_cb" swapped="no"/>
       </object>
-      <packing>
-        <property name="left_attach">2</property>
-        <property name="top_attach">0</property>
-      </packing>
     </child>
     <child>
       <object class="GtkBox" id="result_holder">


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