# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1051474265 0 # Node ID 84f79737b7d9599364afb6c5d3b242d5a7919215 # Parent 47dc310e6d74cd9e89bd934f26d51d444b6b14aa Manually draw the background rectangle with GTK 1.x since it doesn't appear to be able to do it automatically. diff -r 47dc310e6d74 -r 84f79737b7d9 gtk/dw.c --- a/gtk/dw.c Sun Apr 27 19:55:54 2003 +0000 +++ b/gtk/dw.c Sun Apr 27 20:11:05 2003 +0000 @@ -5405,7 +5405,7 @@ pango_layout_set_font_description(layout, font); pango_layout_set_text(layout, text, strlen(text)); - if(_transparent[index]) + if(_transparent[index]) gdk_draw_layout(handle ? handle->window : pixmap->pixmap, gc, x, y + 2, layout); else gdk_draw_layout_with_colors(handle ? handle->window : pixmap->pixmap, gc, x, y + 2, layout, &_foreground[index], &_background[index]); @@ -5422,9 +5422,23 @@ font = gdk_font_load("fixed"); if(font) { - gint ascent; - - gdk_text_extents(font, text, strlen(text), NULL, NULL, NULL, &ascent, NULL); + gint ascent, descent, width; + int index = _find_thread_index(dw_thread_id()); + + gdk_text_extents(font, text, strlen(text), NULL, NULL, &width, &ascent, &descent); + if(!_transparent[index]) + { + GdkGC *gc2 = NULL; + + gc2 = gdk_gc_new(handle ? handle->window : pixmap->pixmap); + if(gc2) + { + gdk_gc_set_foreground(gc2, &_background[index]); + gdk_gc_set_background(gc2, &_background[index]); + } + gdk_draw_rectangle(handle ? handle->window : pixmap->pixmap, gc2, TRUE, x, y, width, ascent + descent + 2); + gdk_gc_unref(gc2); + } gdk_draw_text(handle ? handle->window : pixmap->pixmap, font, gc, x, y + ascent + 2, text, strlen(text)); gdk_font_unref(font); }