[gnome-games] platforms-page: Force hide filtered rows
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] platforms-page: Force hide filtered rows
- Date: Wed, 5 Aug 2020 18:38:29 +0000 (UTC)
commit e2b4a413f787f2ef45a5a9bd72023dd6e197b33d
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Aug 5 23:37:40 2020 +0500
platforms-page: Force hide filtered rows
Make sure css :first-child and :last-child work correctly.
src/ui/platforms-page.vala | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/ui/platforms-page.vala b/src/ui/platforms-page.vala
index c7ca9645a..3542e225c 100644
--- a/src/ui/platforms-page.vala
+++ b/src/ui/platforms-page.vala
@@ -65,8 +65,10 @@ private class Games.PlatformsPage : Gtk.Bin {
if (item == null)
return false;
- if (item.platform == null)
+ if (item.platform == null) {
+ row.hide ();
return false;
+ }
Game[] visible_games = {};
for (int i = 0; i < game_model.get_n_items (); i++) {
@@ -77,9 +79,12 @@ private class Games.PlatformsPage : Gtk.Bin {
}
foreach (var game in visible_games)
- if (game.platform == item.platform)
+ if (game.platform == item.platform) {
+ row.show ();
return true;
+ }
+ row.hide ();
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]