[gnome-music/wip/jfelder/gtk4-v3: 22/40] window: Use AdwViewStack instead of GtkStack




commit f7133325aea6681ad2c422966a0dc7c9211cfa58
Author: Jean Felder <jfelder src gnome org>
Date:   Wed Feb 2 13:57:54 2022 +0100

    window: Use AdwViewStack instead of GtkStack

 data/ui/Window.ui                     | 6 ++----
 gnomemusic/widgets/headerbar.py       | 2 +-
 gnomemusic/widgets/searchheaderbar.py | 2 +-
 3 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/data/ui/Window.ui b/data/ui/Window.ui
index 09c740bcf..c7c53a74d 100644
--- a/data/ui/Window.ui
+++ b/data/ui/Window.ui
@@ -23,12 +23,10 @@
             <property name="vexpand">True</property>
             <property name="visible">True</property>
             <child>
-              <object class="GtkStack" id="_stack">
-                <property name="can-focus">False</property>
+              <object class="AdwViewStack" id="_stack">
+                <property name="focusable">False</property>
                 <property name="hhomogeneous">False</property>
                 <property name="vhomogeneous">False</property>
-                <property name="transition-duration">100</property>
-                <property name="transition-type">crossfade</property>
                 <property name="visible">True</property>
               </object>
             </child>
diff --git a/gnomemusic/widgets/headerbar.py b/gnomemusic/widgets/headerbar.py
index 8fb912938..137115abc 100644
--- a/gnomemusic/widgets/headerbar.py
+++ b/gnomemusic/widgets/headerbar.py
@@ -101,7 +101,7 @@ class HeaderBar(Adw.Bin):
     search_mode_active = GObject.Property(type=bool, default=False)
     selected_songs_count = GObject.Property(type=int, default=0, minimum=0)
     selection_mode_allowed = GObject.Property(type=bool, default=True)
-    stack = GObject.Property(type=Gtk.Stack)
+    stack = GObject.Property(type=Adw.ViewStack)
 
     def __init__(self, application):
         """Initialize Headerbar
diff --git a/gnomemusic/widgets/searchheaderbar.py b/gnomemusic/widgets/searchheaderbar.py
index d437997f1..46f6b6f09 100644
--- a/gnomemusic/widgets/searchheaderbar.py
+++ b/gnomemusic/widgets/searchheaderbar.py
@@ -52,7 +52,7 @@ class SearchHeaderBar(Adw.Bin):
     search_state = GObject.Property(type=int, default=Search.State.NONE)
     selected_songs_count = GObject.Property(type=int, default=0, minimum=0)
     selection_mode_allowed = GObject.Property(type=bool, default=True)
-    stack = GObject.Property(type=Gtk.Stack)
+    stack = GObject.Property(type=Adw.ViewStack)
 
     def __init__(self, application):
         super().__init__()


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