diff options
author | Jasmine Hassan <[email protected]> | 2012-11-07 17:27:04 +0200 |
---|---|---|
committer | Jasmine Hassan <[email protected]> | 2012-11-16 09:45:52 +0200 |
commit | 8af0b94b1f4df47364abc9f7f02cc467ecd1cdee (patch) | |
tree | c9ac66b4ffbb657f98f72702604d96bae6bd5d7c /eel/eel-gdk-extensions.c | |
parent | 2e0b6b0a2e689d5af0ca719ee0ef29f90c4f2e0c (diff) | |
download | caja-8af0b94b1f4df47364abc9f7f02cc467ecd1cdee.tar.bz2 caja-8af0b94b1f4df47364abc9f7f02cc467ecd1cdee.tar.xz |
[eel-gdk-extensions] Add eel_cairo_draw_layout_with_drop_shadow for GTK3
keeping eel_gdk_draw_layout_with_drop_shadow for GTK2
http://git.gnome.org/browse/nautilus/commit/?id=d2f141f4a5435b10b43abea0822e3d0569b67886
Diffstat (limited to 'eel/eel-gdk-extensions.c')
-rw-r--r-- | eel/eel-gdk-extensions.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/eel/eel-gdk-extensions.c b/eel/eel-gdk-extensions.c index 2a5f8734..ed694277 100644 --- a/eel/eel-gdk-extensions.c +++ b/eel/eel-gdk-extensions.c @@ -477,16 +477,23 @@ eel_gdk_parse_geometry (const char *string, int *x_return, int *y_return, } void +#if GTK_CHECK_VERSION(3,0,0) +eel_cairo_draw_layout_with_drop_shadow (cairo_t *cr, +#else eel_gdk_draw_layout_with_drop_shadow (GdkDrawable *drawable, +#endif GdkColor *text_color, GdkColor *shadow_color, int x, int y, PangoLayout *layout) { +#if GTK_CHECK_VERSION(3,0,0) + cairo_save (cr); +#else cairo_t *cr; - cr = gdk_cairo_create (drawable); +#endif gdk_cairo_set_source_color (cr, shadow_color); cairo_move_to (cr, x+1, y+1); @@ -496,7 +503,11 @@ eel_gdk_draw_layout_with_drop_shadow (GdkDrawable *drawable, cairo_move_to (cr, x, y); pango_cairo_show_layout (cr, layout); +#if GTK_CHECK_VERSION(3,0,0) + cairo_restore +#else cairo_destroy (cr); +#endif } #if ! defined (EEL_OMIT_SELF_CHECK) |