[gnome-music/wip/jfelder/open-audio-files: 15/16] window: Set the stack transition once it is populated
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/open-audio-files: 15/16] window: Set the stack transition once it is populated
- Date: Wed, 2 Feb 2022 10:37:36 +0000 (UTC)
commit 074a0deacb76cb8031ee30224cac75fce7532188
Author: Jean Felder <jfelder src gnome org>
Date: Fri Jan 7 15:52:05 2022 +0100
window: Set the stack transition once it is populated
The FilesView is always selected at launch because it is the first
view added to the stack. However, the next commit will add support to
open audio files at launch and the FilesView will be selected instead
of the AlbumsView. This will result in a transition effect from the
AlbumsView to the FilesView.
By setting the stack transition property once the correct view is
selected, this prevents this transition at launch.
data/ui/Window.ui | 2 +-
gnomemusic/window.py | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/data/ui/Window.ui b/data/ui/Window.ui
index 276952595..33ba8c0c6 100644
--- a/data/ui/Window.ui
+++ b/data/ui/Window.ui
@@ -23,7 +23,7 @@
<property name="hhomogeneous">False</property>
<property name="vhomogeneous">False</property>
<property name="transition-duration">100</property>
- <property name="transition-type">crossfade</property>
+ <property name="transition-type">none</property>
<property name="visible">True</property>
</object>
</child>
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 80d8ea6ea..fcd441f02 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -258,6 +258,7 @@ class Window(Handy.ApplicationWindow):
# appears as selected by the stack switcher on launch.
self._stack.props.visible_child = self.views[View.ALBUM]
self._stack.notify("visible-child")
+ self._stack.props.transition_type = Gtk.StackTransitionType.CROSSFADE
self.views[View.SEARCH].bind_property(
"search-state", self._search, "state",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]