Mercurial > dwindows
changeset 383:f040c24bcf26
Slight change to determining font height under GTK 1.2. The solution may
not work correctly for all fonts (only tested with fixed font).
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 01 May 2003 09:04:56 +0000 |
parents | 838781d4f1dc |
children | cbf4df4bc2f1 |
files | gtk/dw.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk/dw.c Wed Apr 30 04:08:52 2003 +0000 +++ b/gtk/dw.c Thu May 01 09:04:56 2003 +0000 @@ -5431,7 +5431,7 @@ */ gdk_text_extents(font, text, strlen(text), NULL, NULL, &width, &junk_ascent, &junk_descent); /* force ascent/descent to be maximum values */ - gdk_text_extents(font, "Xg", 2, NULL, NULL, &junk_width, &ascent, &descent); + gdk_text_extents(font, "(g", 2, NULL, NULL, &junk_width, &ascent, &descent); if(!_transparent[index]) { GdkGC *gc2 = NULL; @@ -5442,10 +5442,10 @@ 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_draw_rectangle(handle ? handle->window : pixmap->pixmap, gc2, TRUE, x, y, width, ascent + descent + 1); gdk_gc_unref(gc2); } - gdk_draw_text(handle ? handle->window : pixmap->pixmap, font, gc, x, y + ascent + 2, text, strlen(text)); + gdk_draw_text(handle ? handle->window : pixmap->pixmap, font, gc, x, y + ascent + 1, text, strlen(text)); gdk_font_unref(font); } #endif