Mercurial > dwindows
changeset 892:82f68adde8a0
Fix for dw_draw_text() not using the background color on GTK3.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 17 Apr 2011 03:34:18 +0000 |
parents | 3774af45eb0c |
children | 39ab47d103c3 |
files | gtk3/dw.c |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);