[gnome-games/wip/exalm/spinner] fixme: A hack for crossfade
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/spinner] fixme: A hack for crossfade
- Date: Wed, 12 Sep 2018 11:56:01 +0000 (UTC)
commit 2b832fec8444f2f9f8b03358405fb48751235e12
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Wed Sep 5 21:23:17 2018 +0500
fixme: A hack for crossfade
The main stacks don't use transition by default. However, we want it to
happen for loading state. One solution would be to enable it generally,
but this one enables it only while switching from loading to collection
initially. :(
src/ui/application-window.vala | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/ui/application-window.vala b/src/ui/application-window.vala
index 8f4fb522..4a6f09de 100644
--- a/src/ui/application-window.vala
+++ b/src/ui/application-window.vala
@@ -711,7 +711,12 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
}
public void on_collection_loaded () {
- if (ui_state == UiState.LOADING)
+ if (ui_state == UiState.LOADING) {
+ content_box.transition_type = Gtk.StackTransitionType.CROSSFADE;
+ header_bar.transition_type = Gtk.StackTransitionType.CROSSFADE;
ui_state = UiState.COLLECTION;
+ content_box.transition_type = Gtk.StackTransitionType.NONE;
+ header_bar.transition_type = Gtk.StackTransitionType.NONE;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]