From bd25c5b4c173bb3541f204c60ffb9450a0d010cd Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Fri, 20 Jan 2017 15:49:00 +0100 Subject: status-notifier: Fix elements display on GTK < 3.20 On GTK 3.20 onwards, themes are expected to use CSS names rather than widget class names, and apparently CSS names are not inherited. So, a derived widget altering its CSS name won't be styled as its parent classes. Thus, SnItem setting the CSS name "sn-item" avoids being styled as a "button". But on older GTK versions, the widget class being used makes this change ineffective. Fix that by introducing a custom derived button that doesn't draw the unwanted parts. --- applets/notification_area/status-notifier/sn-item.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'applets/notification_area/status-notifier/sn-item.h') diff --git a/applets/notification_area/status-notifier/sn-item.h b/applets/notification_area/status-notifier/sn-item.h index de7de892..3736c1d8 100644 --- a/applets/notification_area/status-notifier/sn-item.h +++ b/applets/notification_area/status-notifier/sn-item.h @@ -20,6 +20,8 @@ #include +#include "sn-flat-button.h" + G_BEGIN_DECLS #define SN_TYPE_ITEM (sn_item_get_type ()) @@ -41,14 +43,14 @@ typedef struct _SnItemClass SnItemClass; struct _SnItem { - GtkButtonClass parent_instance; + SnFlatButtonClass parent_instance; SnItemPrivate *priv; }; struct _SnItemClass { - GtkButtonClass parent_class; + SnFlatButtonClass parent_class; void (* ready) (SnItem *item); -- cgit v1.2.1