[gnome-music/wip/mschraal/gtk4: 12/84] data/ui: HeaderBar fixes



commit add2bcd58dd357aa8fe2ca55e96ea6ffbb16f1dc
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Oct 31 13:40:14 2019 +0100

    data/ui: HeaderBar fixes
    
    Assorted fixes to make HeaderBar work with GTK4.

 data/ui/HeaderBar.ui | 110 ++++++++++++++++-----------------------------------
 1 file changed, 35 insertions(+), 75 deletions(-)
---
diff --git a/data/ui/HeaderBar.ui b/data/ui/HeaderBar.ui
index c0e8578a..2beca711 100644
--- a/data/ui/HeaderBar.ui
+++ b/data/ui/HeaderBar.ui
@@ -1,128 +1,88 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 3.10 -->
   <template class="HeaderBar" parent="GtkHeaderBar">
     <property name="visible">True</property>
     <property name="vexpand">False</property>
     <style>
       <class name="titlebar"/>
     </style>
-    <child>
-      <object class="GtkMenuButton" id="_menu_button">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
+    <child type="start">
+      <object class="GtkButton" id="_back_button">
+        <property name="valign">center</property>
+        <property name="tooltip_text" translatable="yes">Back</property>
+        <signal name="clicked" handler="_on_back_button_clicked" swapped="no"/>
+        <style>
+          <class name="image-button"/>
+        </style>
+        <child>
+          <object class="GtkImage" id="_back_button_image">
+            <property name="icon-name">go-previous-symbolic</property>
+            <property name="icon-size">1</property>
+          </object>
+        </child>
+      </object>
+    </child>
+    <child type="end">
+      <object class="GtkButton" id="_cancel_button">
+        <property name="label" translatable="yes">_Cancel</property>
+        <property name="use_underline">1</property>
         <property name="valign">center</property>
-        <property name="sensitive">True</property>
+        <signal name="clicked" handler="_on_cancel_button_clicked" swapped="no"/>
+        <style>
+          <class name="text-button"/>
+        </style>
+      </object>
+    </child>
+    <child type="end">
+      <object class="GtkMenuButton" id="_menu_button">
         <property name="tooltip_text" translatable="yes">Menu</property>
         <style>
           <class name="image-button"/>
         </style>
         <child>
           <object class="GtkImage" id="_menu_button_image">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="icon-name">open-menu-symbolic</property>
             <property name="icon-size">1</property>
           </object>
         </child>
       </object>
-      <packing>
-        <property name="pack_type">end</property>
-      </packing>
     </child>
-    <child>
+    <child type="end">
       <object class="GtkToggleButton" id="_select_button">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="valign">center</property>
-        <property name="sensitive">True</property>
         <property name="tooltip_text" translatable="yes">Select</property>
         <style>
           <class name="image-button"/>
         </style>
         <child>
           <object class="GtkImage" id="_select_button_image">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="icon-name">object-select-symbolic</property>
             <property name="icon-size">1</property>
           </object>
         </child>
       </object>
-      <packing>
-        <property name="pack_type">end</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkButton" id="_cancel_button">
-        <property name="visible">False</property>
-        <property name="can_focus">False</property>
-        <property name="label" translatable="yes">_Cancel</property>
-        <property name="use_underline">True</property>
-        <property name="valign">center</property>
-        <property name="sensitive">True</property>
-        <signal name="clicked" handler="_on_cancel_button_clicked" swapped="no"/>
-        <style>
-          <class name="text-button"/>
-        </style>
-      </object>
-      <packing>
-        <property name="pack_type">end</property>
-      </packing>
     </child>
-    <child>
+    <child type="end">
       <object class="GtkToggleButton" id="_search_button">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
         <property name="valign">center</property>
-        <property name="sensitive">True</property>
         <property name="tooltip_text" translatable="yes">Search</property>
         <style>
           <class name="image-button"/>
         </style>
         <child>
           <object class="GtkImage" id="_search_button_image">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
             <property name="icon-name">edit-find-symbolic</property>
             <property name="icon-size">1</property>
           </object>
         </child>
       </object>
-      <packing>
-        <property name="pack_type">end</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkButton" id="_back_button">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="valign">center</property>
-        <property name="sensitive">True</property>
-        <property name="tooltip_text" translatable="yes">Back</property>
-        <signal name="clicked" handler="_on_back_button_clicked" swapped="no"/>
-        <style>
-              <class name="image-button"/>
-        </style>
-        <child>
-          <object class="GtkImage" id="_back_button_image">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="icon-name">go-previous-symbolic</property>
-            <property name="icon-size">1</property>
-          </object>
-        </child>
-      </object>
-      <packing>
-        <property name="pack_type">start</property>
-      </packing>
     </child>
   </template>
   <object class="GtkSizeGroup" id="size1">
-      <property name="mode">vertical</property>
-      <widgets>
-        <widget name="_search_button"/>
-        <widget name="_cancel_button"/>
-      </widgets>
+    <property name="mode">vertical</property>
+    <widgets>
+      <widget name="_search_button"/>
+      <widget name="_cancel_button"/>
+    </widgets>
   </object>
 </interface>


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