[libwnck/wip/warnings3: 6/12] tasklist: avoid deprecated gtk_style_context_get_background_color
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck/wip/warnings3: 6/12] tasklist: avoid deprecated gtk_style_context_get_background_color
- Date: Fri, 5 May 2017 09:47:14 +0000 (UTC)
commit e6b2aafadf82bbb64cfaa0d79897cb1a81bb25be
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Apr 28 14:17:54 2017 +0300
tasklist: avoid deprecated gtk_style_context_get_background_color
libwnck/tasklist.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
index 34d7d9b..ed77e83 100644
--- a/libwnck/tasklist.c
+++ b/libwnck/tasklist.c
@@ -3988,16 +3988,13 @@ wnck_task_draw (GtkWidget *widget,
gtk_widget_style_get (tasklist_widget, "fade-overlay-rect", &overlay_rect, NULL);
if (overlay_rect)
{
- GdkRGBA bg_color;
-
gtk_style_context_save (context);
gtk_style_context_set_state (context, GTK_STATE_FLAG_SELECTED);
- gtk_style_context_get_background_color (context, GTK_STATE_FLAG_SELECTED, &bg_color);
- gtk_style_context_restore (context);
/* Draw a rectangle with selected background color */
- gdk_cairo_set_source_rgba (cr, &bg_color);
- cairo_paint (cr);
+ gtk_render_background (context, cr, 0, 0, width, height);
+
+ gtk_style_context_restore (context);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]