# HG changeset patch # User Anselm R. Garbe # Date 1156405301 -7200 # Node ID 977585eb2d353beef5b5ae34c5a833dd98d0f208 # Parent 93192711a36a702a21472549da059a99393e5383 found less intrusive way diff -r 93192711a36a -r 977585eb2d35 draw.c --- a/draw.c Thu Aug 24 09:25:10 2006 +0200 +++ b/draw.c Thu Aug 24 09:41:41 2006 +0200 @@ -22,7 +22,7 @@ } static void -drawtext(const char *text, Bool invert, Bool underline) +drawtext(const char *text, Bool invert, Bool highlight) { int x, y, w, h; static char buf[256]; @@ -85,12 +85,18 @@ XChangeGC(dpy, dc.gc, GCForeground | GCBackground | GCFont, &gcv); XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len); } - if(underline) { - points[0].x = dc.x + (h / 2) - 1; - points[0].y = dc.y + dc.h - 3; - points[1].x = dc.w - h + 2; + if(highlight) { + points[0].x = dc.x + 1; + points[0].y = dc.y + 1; + points[1].x = dc.w - 3; points[1].y = 0; - XDrawLines(dpy, dc.drawable, dc.gc, points, 2, CoordModePrevious); + points[2].x = 0; + points[2].y = dc.h - 3; + points[3].x = -(dc.w - 3); + points[3].y = 0; + points[4].x = 0; + points[4].y = -(dc.h - 3); + XDrawLines(dpy, dc.drawable, dc.gc, points, 5, CoordModePrevious); } }