diff options
author | raveit65 <[email protected]> | 2016-08-07 09:22:11 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2016-09-01 08:14:49 +0200 |
commit | 8819ce43d5dcdfd102fd63f7a5ae7713a9e25b04 (patch) | |
tree | 69e8f10a8e4aa5675654c3cb8ec7b0ee30d9d87f /baobab/src/baobab-chart.c | |
parent | 8c3cbb03ae3a333af2582bda1aa893c438814fb0 (diff) | |
download | mate-utils-8819ce43d5dcdfd102fd63f7a5ae7713a9e25b04.tar.bz2 mate-utils-8819ce43d5dcdfd102fd63f7a5ae7713a9e25b04.tar.xz |
GTK+-3 babab-chart: use GtkStyleContext
taken from:
https://git.gnome.org/browse/baobab/commit/?id=b6642cd
Diffstat (limited to 'baobab/src/baobab-chart.c')
-rw-r--r-- | baobab/src/baobab-chart.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/baobab/src/baobab-chart.c b/baobab/src/baobab-chart.c index b52b4371..03c88338 100644 --- a/baobab/src/baobab-chart.c +++ b/baobab/src/baobab-chart.c @@ -314,6 +314,9 @@ baobab_chart_realize (GtkWidget *widget) gint attributes_mask; GtkAllocation allocation; GdkWindow *window; +#if GTK_CHECK_VERSION (3, 0, 0) + GtkStyleContext *context; +#endif g_return_if_fail (BAOBAB_IS_CHART (widget)); @@ -346,10 +349,15 @@ baobab_chart_realize (GtkWidget *widget) gtk_widget_set_window (widget, window); gdk_window_set_user_data (window, chart); +#if GTK_CHECK_VERSION (3, 0, 0) + context = gtk_widget_get_style_context (widget); + gtk_style_context_set_background (context, window); +#else gtk_widget_style_attach (widget); gtk_style_set_background (gtk_widget_get_style (widget), window, GTK_STATE_NORMAL); +#endif gtk_widget_add_events (widget, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | |