[gnome-games/wip/exalm/rebrand: 122/124] collection-view: Stop using HdySwipeGroup
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/rebrand: 122/124] collection-view: Stop using HdySwipeGroup
- Date: Sat, 19 Jun 2021 14:37:47 +0000 (UTC)
commit 2db3c709375724c530687044f756289993769817
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sat Jun 19 19:03:35 2021 +0500
collection-view: Stop using HdySwipeGroup
We were still using swipe groups for collections. Regress the UI a bit,
stop using deck for header bars and use a regular stack instead, so we
can remove swipe groups.
src/ui/collection-view.ui | 9 ++-------
src/ui/collection-view.vala | 17 +++++++++--------
src/ui/collections-page.vala | 4 ----
3 files changed, 11 insertions(+), 19 deletions(-)
---
diff --git a/src/ui/collection-view.ui b/src/ui/collection-view.ui
index ad35d91d..3af80eeb 100644
--- a/src/ui/collection-view.ui
+++ b/src/ui/collection-view.ui
@@ -17,9 +17,9 @@
<property name="visible">True</property>
<property name="transition-type">crossfade</property>
<child>
- <object class="HdyDeck" id="collections_deck">
+ <object class="GtkStack" id="collections_stack">
<property name="visible">True</property>
- <property name="can-swipe-back">True</property>
+ <property name="transition-type">crossfade</property>
<child>
<object class="HdyHeaderBar" id="header_bar">
<property name="visible">True</property>
@@ -567,11 +567,6 @@
</object>
</child>
</object>
- <object class="HdySwipeGroup" id="collections_swipe_group">
- <swipeables>
- <swipeable name="collections_deck"/>
- </swipeables>
- </object>
<menu id="primary_menu">
<section>
<item>
diff --git a/src/ui/collection-view.vala b/src/ui/collection-view.vala
index 7678a045..813a63a6 100644
--- a/src/ui/collection-view.vala
+++ b/src/ui/collection-view.vala
@@ -7,7 +7,7 @@ private class Games.CollectionView : Gtk.Box, UiView {
public signal void game_activated (Game game);
[GtkChild]
- private unowned Hdy.Deck collections_deck;
+ private unowned Gtk.Stack collections_stack;
[GtkChild]
private unowned Gtk.Stack header_bar_stack;
[GtkChild]
@@ -41,8 +41,6 @@ private class Games.CollectionView : Gtk.Box, UiView {
[GtkChild]
private unowned Hdy.ViewSwitcherBar view_switcher_bar;
[GtkChild]
- private unowned Hdy.SwipeGroup collections_swipe_group;
- [GtkChild]
private unowned UndoNotification undo_notification;
[GtkChild]
private unowned Gtk.Entry collection_rename_entry;
@@ -162,8 +160,6 @@ private class Games.CollectionView : Gtk.Box, UiView {
viewstack.child_set (games_page, "icon-name", icon_name);
empty_collection.icon_name = icon_name;
- collections_swipe_group.add_swipeable (collections_page.get_collections_deck ());
-
konami_code = new KonamiCode (window);
konami_code.code_performed.connect (on_konami_code_performed);
@@ -469,6 +465,11 @@ private class Games.CollectionView : Gtk.Box, UiView {
update_bottom_bar ();
update_available_selection_actions ();
search_mode = false;
+
+ if (collections_page.is_subpage_open)
+ collections_stack.visible_child = collection_subpage_header_bar;
+ else
+ collections_stack.visible_child = header_bar;
}
[GtkCallback]
@@ -554,11 +555,11 @@ private class Games.CollectionView : Gtk.Box, UiView {
}
else {
select_none ();
- header_bar_stack.visible_child = collections_deck;
+ header_bar_stack.visible_child = collections_stack;
if (collections_page.is_subpage_open)
- collections_deck.visible_child = collection_subpage_header_bar;
+ collections_stack.visible_child = collection_subpage_header_bar;
else
- collections_deck.visible_child = header_bar;
+ collections_stack.visible_child = header_bar;
}
update_bottom_bar ();
diff --git a/src/ui/collections-page.vala b/src/ui/collections-page.vala
index e28dd572..4fe63f4c 100644
--- a/src/ui/collections-page.vala
+++ b/src/ui/collections-page.vala
@@ -131,10 +131,6 @@ private class Games.CollectionsPage : Gtk.Bin {
collections_main_page.set_filter (filtering_terms);
}
- public Hdy.Deck get_collections_deck () {
- return collections_deck;
- }
-
public bool exit_subpage () {
return on_subpage_back_clicked ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]