[gnome-software: 1/10] shell: Add a view switcher to the main header bar




commit f2d8fe1b5ff4f34449a3e8678383da05a20b35b0
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Mon Jun 21 08:22:18 2021 +0200

    shell: Add a view switcher to the main header bar

 src/gs-shell.ui | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-shell.ui b/src/gs-shell.ui
index ebb408c14..b9833bd49 100644
--- a/src/gs-shell.ui
+++ b/src/gs-shell.ui
@@ -133,6 +133,7 @@
                             <property name="can-focus">False</property>
                             <property name="hexpand">True</property>
                             <property name="show-close-button">True</property>
+                            <property name="centering-policy">strict</property>
                             <child>
                               <object class="GtkToggleButton" id="search_button_main">
                                 <property name="visible" bind-source="main_leaflet" bind-property="folded" 
bind-flags="sync-create"/>
@@ -188,6 +189,13 @@
                                 <property name="pack-type">end</property>
                               </packing>
                             </child>
+                            <child type="title">
+                              <object class="HdyViewSwitcherTitle" id="title_switcher">
+                                <property name="visible">True</property>
+                                <property name="stack">stack_main</property>
+                                <property name="title" bind-source="GsShell" bind-property="title" 
bind-flags="sync-create"/>
+                              </object>
+                            </child>
                           </object>
                         </child>
                       </object>
@@ -593,8 +601,7 @@
                             <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="reveal" bind-source="title_switcher" 
bind-property="title-visible" bind-flags="sync-create"/>
                                 <property name="stack">stack_main</property>
                               </object>
                             </child>


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