about summary refs log tree commit diff stats
path: root/draw.c
diff options
context:
space:
mode:
authorarg@mig29 <unknown>2006-12-01 16:55:42 +0100
committerarg@mig29 <unknown>2006-12-01 16:55:42 +0100
commit6e72d781f71dd38fffae1f34cb0c9930b40e74d6 (patch)
tree7643ecf17e861cb0fa50fb6ae25528fecfd7a72c /draw.c
parent4e926a9ef2b68d7a596cd429b0bd9379795317be (diff)
downloaddwm-6e72d781f71dd38fffae1f34cb0c9930b40e74d6.tar.gz
dood
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/draw.c b/draw.c
index 0e399d8..0237b40 100644
--- a/draw.c
+++ b/draw.c
@@ -30,7 +30,7 @@ textnw(const char *text, unsigned int len) {
 }
 
 static void
-drawtext(const char *text, unsigned long col[ColLast], Bool dot, Bool line) {
+drawtext(const char *text, unsigned long col[ColLast], Bool hborder, Bool vborder) {
 	int x, y, w, h;
 	static char buf[256];
 	unsigned int len, olen;
@@ -73,14 +73,15 @@ drawtext(const char *text, unsigned long col[ColLast], Bool dot, Bool line) {
 		XChangeGC(dpy, dc.gc, GCForeground | GCFont, &gcv);
 		XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len);
 	}
-	if(dot) {
-		r.x = dc.x + 1;
-		r.y = dc.y + 2;
-		r.width = r.height = (h + 2) / 4;
-		XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
+	if(vborder) {
+		XDrawLine(dpy, dc.drawable, dc.gc, dc.x + 1, dc.y + 1, dc.x + 1, dc.y + dc.h - 1);
+		XDrawLine(dpy, dc.drawable, dc.gc, dc.x + dc.w - 2, dc.y + 1, dc.x + dc.w - 2, dc.y + dc.h - 1);
 	}
-	if(line)
-		XDrawLine(dpy, dc.drawable, dc.gc, dc.x + 1, dc.y + 1, dc.x + dc.w - 1, dc.y + 1); }
+	if(hborder) {
+		XDrawLine(dpy, dc.drawable, dc.gc, dc.x + 1, dc.y + 1, dc.x + dc.w - 2, dc.y + 1);
+		XDrawLine(dpy, dc.drawable, dc.gc, dc.x + 1, dc.y + dc.h - 2, dc.x + dc.w - 2, dc.y + dc.h - 2);
+	}
+}
 
 /* extern */