[gnome-software/1381-category-page-loading-state-doesn-t-match-final-layout] gs-summary-tile: Remove the 'button' class name on the widget



commit 0cd7cf8474cdda306a24b81936fde33a0cd53e76
Author: Milan Crha <mcrha redhat com>
Date:   Fri Jan 28 11:11:51 2022 +0100

    gs-summary-tile: Remove the 'button' class name on the widget
    
    ...and replace it with the `activatable` style. This way the tile
    can be made like inactive, not change its view when a mouse hovers
    above it. It will be used for the placeholder tiles.

 src/gs-summary-tile.c  | 2 ++
 src/gs-summary-tile.ui | 1 +
 2 files changed, 3 insertions(+)
---
diff --git a/src/gs-summary-tile.c b/src/gs-summary-tile.c
index 468ac2e85..c447eb617 100644
--- a/src/gs-summary-tile.c
+++ b/src/gs-summary-tile.c
@@ -183,6 +183,8 @@ gs_summary_tile_class_init (GsSummaryTileClass *klass)
 
        gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Software/gs-summary-tile.ui");
        gtk_widget_class_set_layout_manager_type (widget_class, GS_TYPE_SUMMARY_TILE_LAYOUT);
+       /* Override the 'button' class name, to be able to turn off hover states */
+       gtk_widget_class_set_css_name (widget_class, "gs-summary-tile");
 
        gtk_widget_class_bind_template_child (widget_class, GsSummaryTile,
                                              image);
diff --git a/src/gs-summary-tile.ui b/src/gs-summary-tile.ui
index 1c92ab38d..8e28230e3 100644
--- a/src/gs-summary-tile.ui
+++ b/src/gs-summary-tile.ui
@@ -7,6 +7,7 @@
     <property name="preferred-width">270</property>
     <style>
       <class name="card"/>
+      <class name="activatable"/>
     </style>
     <child>
       <object class="GtkStack" id="stack">


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