[gnome-games] games-page: Add property to optionally hide favorite stars



commit 0d6a4f446f35c8aae6fe5590df35ab4f534c2a6f
Author: Neville <nevilleantony98 gmail com>
Date:   Wed Jun 24 19:21:47 2020 +0530

    games-page: Add property to optionally hide favorite stars
    
    This prop helps us to hide the favorite stars in a GamesPage. Default
    is to not hide. Helps to hide stars in collections such as Favorites
    Collection where every game is obviously favorite.

 src/ui/games-page.vala | 13 +++++++++++++
 1 file changed, 13 insertions(+)
---
diff --git a/src/ui/games-page.vala b/src/ui/games-page.vala
index a116c743..9594d3af 100644
--- a/src/ui/games-page.vala
+++ b/src/ui/games-page.vala
@@ -22,6 +22,19 @@ private class Games.GamesPage : Gtk.Bin {
                }
        }
 
+       private bool _hide_stars;
+       public bool hide_stars {
+               get { return _hide_stars; }
+               set {
+                       _hide_stars = value;
+
+                       if (hide_stars)
+                               get_style_context ().add_class ("hide-stars");
+                       else
+                               get_style_context ().remove_class ("hide-stars");
+               }
+       }
+
        private GenericSet<GameIconView> selected_games;
        private Binding window_active_binding;
        private bool _is_active;


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