[gnome-software] trivial: Show missing reviews as ony-just-visible stars



commit 2401bc866ccd385f5c318f810b90f10415434161
Author: Richard Hughes <richard hughsie com>
Date:   Fri Jul 8 12:28:14 2016 +0100

    trivial: Show missing reviews as ony-just-visible stars

 src/gs-popular-tile.c  |    4 ++--
 src/gs-popular-tile.ui |    3 +++
 src/gtk-style.css      |    4 ++++
 3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-popular-tile.c b/src/gs-popular-tile.c
index 49130b4..2e1e0d9 100644
--- a/src/gs-popular-tile.c
+++ b/src/gs-popular-tile.c
@@ -113,11 +113,11 @@ gs_popular_tile_set_app (GsAppTile *app_tile, GsApp *app)
                return;
 
        if (gs_app_get_rating (tile->app) >= 0) {
-               gtk_widget_set_visible (tile->stars, TRUE);
+               gtk_widget_set_sensitive (tile->stars, TRUE);
                gs_star_widget_set_rating (GS_STAR_WIDGET (tile->stars),
                                           gs_app_get_rating (tile->app));
        } else {
-               gtk_widget_set_visible (tile->stars, FALSE);
+               gtk_widget_set_sensitive (tile->stars, FALSE);
        }
        gtk_stack_set_visible_child_name (GTK_STACK (tile->stack), "content");
 
diff --git a/src/gs-popular-tile.ui b/src/gs-popular-tile.ui
index 0fdfabb..40bde97 100644
--- a/src/gs-popular-tile.ui
+++ b/src/gs-popular-tile.ui
@@ -96,6 +96,9 @@
                       <object class="GsStarWidget" id="stars">
                         <property name="visible">True</property>
                         <property name="halign">center</property>
+                        <style>
+                          <class name="onlyjustvisible"/>
+                        </style>
                       </object>
                       <packing>
                         <property name="expand">False</property>
diff --git a/src/gtk-style.css b/src/gtk-style.css
index 62144db..55c2d01 100644
--- a/src/gtk-style.css
+++ b/src/gtk-style.css
@@ -54,6 +54,10 @@
        background-color: mix(@insensitive_fg_color, @theme_unfocused_bg_color, 0.8);
 }
 
+.onlyjustvisible:insensitive {
+       opacity: 0.25;
+}
+
 .kudo-label {
        background-image: none;
        background-color: shade(@theme_selected_bg_color, 1.2);


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