diff options
author | Stefano Karapetsas <[email protected]> | 2014-03-07 00:08:10 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-03-07 00:08:10 +0100 |
commit | 34e86df9a8608aa88b5712e23ba02e0f4da4aaef (patch) | |
tree | 1eb3809a111b4e7336cbbe337804e59c9a072bc0 /libmate-desktop/mate-bg-crossfade.c | |
parent | ff1ebe30c989cea51c2c33183e2a652394ce6a9c (diff) | |
parent | 0eef05307bd0c2acb5c780b8f85a239ca810625d (diff) | |
download | mate-desktop-34e86df9a8608aa88b5712e23ba02e0f4da4aaef.tar.bz2 mate-desktop-34e86df9a8608aa88b5712e23ba02e0f4da4aaef.tar.xz |
Merge pull request #102 from dnk/rgba
gtk3: GdkRGBA support
Diffstat (limited to 'libmate-desktop/mate-bg-crossfade.c')
-rw-r--r-- | libmate-desktop/mate-bg-crossfade.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libmate-desktop/mate-bg-crossfade.c b/libmate-desktop/mate-bg-crossfade.c index 3242004..716c782 100644 --- a/libmate-desktop/mate-bg-crossfade.c +++ b/libmate-desktop/mate-bg-crossfade.c @@ -277,9 +277,19 @@ tile_surface (cairo_surface_t *surface, } else { +#if GTK_CHECK_VERSION(3, 0, 0) + GtkStyleContext *style_context; + style_context = gtk_style_context_new(); + GdkRGBA color; + gtk_style_context_get(style_context, GTK_STATE_FLAG_NORMAL, + GTK_STYLE_PROPERTY_BACKGROUND_COLOR, &color, + NULL); + gdk_cairo_set_source_rgba(cr, &color); +#else GtkStyle *style; style = gtk_widget_get_default_style (); gdk_cairo_set_source_color(cr, &style->bg[GTK_STATE_NORMAL]); +#endif } cairo_paint (cr); |