[libadwaita] view-switcher-button: Move indicator to icon for wide mode



commit f5e843ed1da70694c3782f5c3a109498725a39a4
Author: CodedOre <CodedOre>
Date:   Mon Jun 28 17:32:31 2021 +0500

    view-switcher-button: Move indicator to icon for wide mode

 src/adw-view-switcher-button.ui | 45 +++++++++++++++++++++--------------------
 1 file changed, 23 insertions(+), 22 deletions(-)
---
diff --git a/src/adw-view-switcher-button.ui b/src/adw-view-switcher-button.ui
index daf21b6e..928c6500 100644
--- a/src/adw-view-switcher-button.ui
+++ b/src/adw-view-switcher-button.ui
@@ -20,37 +20,37 @@
             <style>
               <class name="wide"/>
             </style>
-            <child>
-              <object class="GtkImage" id="horizontal_image">
-                <property name="icon-name" bind-source="AdwViewSwitcherButton" bind-property="icon-name" 
bind-flags="sync-create" />
-              </object>
-            </child>
             <child>
               <object class="AdwIndicatorBin">
-                <property name="contained">True</property>
+                <property name="valign">center</property>
                 <binding name="needs-attention">
                   <closure type="gboolean" function="should_show_indicator">
                     <lookup name="needs-attention">AdwViewSwitcherButton</lookup>
                     <lookup name="active">AdwViewSwitcherButton</lookup>
                   </closure>
                 </binding>
+                <property name="child">
+                  <object class="GtkImage" id="horizontal_image">
+                    <property name="icon-name" bind-source="AdwViewSwitcherButton" bind-property="icon-name" 
bind-flags="sync-create" />
+                  </object>
+                </property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkStack" id="horizontal_label_stack">
                 <child>
-                  <object class="GtkStack" id="horizontal_label_stack">
-                    <child>
-                      <object class="GtkLabel" id="horizontal_label_inactive">
-                        <property name="label" bind-source="AdwViewSwitcherButton" bind-property="label" 
bind-flags="sync-create|bidirectional" />
-                        <property name="use-underline" bind-source="AdwViewSwitcherButton" 
bind-property="use-underline" bind-flags="sync-create|bidirectional" />
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="horizontal_label_active">
-                        <property name="label" bind-source="AdwViewSwitcherButton" bind-property="label" 
bind-flags="sync-create|bidirectional" />
-                        <property name="use-underline" bind-source="AdwViewSwitcherButton" 
bind-property="use-underline" bind-flags="sync-create|bidirectional" />
-                        <style>
-                          <class name="active"/>
-                        </style>
-                      </object>
-                    </child>
+                  <object class="GtkLabel" id="horizontal_label_inactive">
+                    <property name="label" bind-source="AdwViewSwitcherButton" bind-property="label" 
bind-flags="sync-create|bidirectional" />
+                    <property name="use-underline" bind-source="AdwViewSwitcherButton" 
bind-property="use-underline" bind-flags="sync-create|bidirectional" />
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="horizontal_label_active">
+                    <property name="label" bind-source="AdwViewSwitcherButton" bind-property="label" 
bind-flags="sync-create|bidirectional" />
+                    <property name="use-underline" bind-source="AdwViewSwitcherButton" 
bind-property="use-underline" bind-flags="sync-create|bidirectional" />
+                    <style>
+                      <class name="active"/>
+                    </style>
                   </object>
                 </child>
               </object>
@@ -69,6 +69,7 @@
             <child>
               <object class="AdwIndicatorBin">
                 <property name="halign">center</property>
+                <property name="valign">center</property>
                 <binding name="needs-attention">
                   <closure type="gboolean" function="should_show_indicator">
                     <lookup name="needs-attention">AdwViewSwitcherButton</lookup>


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