# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1303011258 0 # Node ID 82f68adde8a0292f62f81d5c50211dad1b84554e # Parent 3774af45eb0c04cd73921b8f6947991113b11b32 Fix for dw_draw_text() not using the background color on GTK3. diff -r 3774af45eb0c -r 82f68adde8a0 gtk3/dw.c --- a/gtk3/dw.c Sun Apr 17 02:45:20 2011 +0000 +++ b/gtk3/dw.c Sun Apr 17 03:34:18 2011 +0000 @@ -6866,6 +6866,21 @@ pango_layout_set_text(layout, text, strlen(text)); gdk_cairo_set_source_color (cr, &_foreground[index]); + /* Create a background color attribute if required */ + if(!_transparent[index]) + { + PangoAttrList *list = pango_layout_get_attributes(layout); + PangoAttribute *attr = pango_attr_background_new(_background[index].red, + _background[index].green, + _background[index].blue); + if(!list) + { + list = pango_attr_list_new(); + } + pango_attr_list_change(list, attr); + pango_layout_set_attributes(layout, list); + } + /* Do the drawing */ cairo_move_to(cr, x, y); pango_cairo_show_layout (cr, layout);