[gnome-software: 1/3] shell: Refactor the view switcher




commit 4dc610ace55ecc84cfdc61dcc4b0e9ab9970fb72
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Apr 20 11:14:15 2021 +0200

    shell: Refactor the view switcher
    
    Use the more appropriate HdyViewSwitcherBar and put it at the very
    bottom of the window. This fixes some weird jumps during the transition
    and make the UI look better overall.
    
    This purposefully breaks the indentation, it will be fixed in the next
    commit to ease reviewing the actual changes.

 src/gs-shell.ui | 34 ++++++++++++++--------------------
 1 file changed, 14 insertions(+), 20 deletions(-)
---
diff --git a/src/gs-shell.ui b/src/gs-shell.ui
index 2d9817be1..95827ecf9 100644
--- a/src/gs-shell.ui
+++ b/src/gs-shell.ui
@@ -216,6 +216,10 @@
       </object>
     </child>
 
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
     <child>
       <object class="GtkOverlay" id="overlay">
         <property name="visible">True</property>
@@ -549,32 +553,22 @@
                     </child>
                   </object>
                 </child>
-
-                <child>
-                  <object class="GtkSeparator">
-                    <property name="visible" bind-source="sidebar_switcher" bind-property="visible" 
bind-flags="sync-create" />
-                    <property name="can-focus">False</property>
-                    <property name="orientation">horizontal</property>
-                    <style>
-                      <class name="sidebar"/>
-                    </style>
-                  </object>
-                </child>
-
-                <child>
-                  <object class="HdyViewSwitcher" id="sidebar_switcher">
-                    <property name="visible" bind-source="header_leaflet" bind-property="folded" 
bind-flags="sync-create"/>
-                    <property name="can-focus">True</property>
-                    <property name="stack">stack_main</property>
-                    <property name="policy">HDY_VIEW_SWITCHER_POLICY_NARROW</property>
-                  </object>
-                </child>
               </object>
             </child>
 
           </object>
         </child>
       </object>
+    </child>
+        <child>
+          <object class="HdyViewSwitcherBar" id="sidebar_switcher">
+            <property name="visible">True</property>
+            <property name="reveal" bind-source="header_leaflet" bind-property="folded" 
bind-flags="sync-create"/>
+            <property name="can-focus">True</property>
+            <property name="stack">stack_main</property>
+          </object>
+        </child>
+      </object>
     </child>
   </template>
 


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