dwm-meillo

changeset 604:2c366b252717

dood
author arg@mig29
date Fri, 01 Dec 2006 16:55:42 +0100
parents 213d67302d28
children 755d8dcb8a05
files draw.c
diffstat 1 files changed, 9 insertions(+), 8 deletions(-) [+]
line diff
     1.1 --- a/draw.c	Fri Dec 01 15:50:22 2006 +0100
     1.2 +++ b/draw.c	Fri Dec 01 16:55:42 2006 +0100
     1.3 @@ -30,7 +30,7 @@
     1.4  }
     1.5  
     1.6  static void
     1.7 -drawtext(const char *text, unsigned long col[ColLast], Bool dot, Bool line) {
     1.8 +drawtext(const char *text, unsigned long col[ColLast], Bool hborder, Bool vborder) {
     1.9  	int x, y, w, h;
    1.10  	static char buf[256];
    1.11  	unsigned int len, olen;
    1.12 @@ -73,14 +73,15 @@
    1.13  		XChangeGC(dpy, dc.gc, GCForeground | GCFont, &gcv);
    1.14  		XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len);
    1.15  	}
    1.16 -	if(dot) {
    1.17 -		r.x = dc.x + 1;
    1.18 -		r.y = dc.y + 2;
    1.19 -		r.width = r.height = (h + 2) / 4;
    1.20 -		XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
    1.21 +	if(vborder) {
    1.22 +		XDrawLine(dpy, dc.drawable, dc.gc, dc.x + 1, dc.y + 1, dc.x + 1, dc.y + dc.h - 1);
    1.23 +		XDrawLine(dpy, dc.drawable, dc.gc, dc.x + dc.w - 2, dc.y + 1, dc.x + dc.w - 2, dc.y + dc.h - 1);
    1.24  	}
    1.25 -	if(line)
    1.26 -		XDrawLine(dpy, dc.drawable, dc.gc, dc.x + 1, dc.y + 1, dc.x + dc.w - 1, dc.y + 1); }
    1.27 +	if(hborder) {
    1.28 +		XDrawLine(dpy, dc.drawable, dc.gc, dc.x + 1, dc.y + 1, dc.x + dc.w - 2, dc.y + 1);
    1.29 +		XDrawLine(dpy, dc.drawable, dc.gc, dc.x + 1, dc.y + dc.h - 2, dc.x + dc.w - 2, dc.y + dc.h - 2);
    1.30 +	}
    1.31 +}
    1.32  
    1.33  /* extern */
    1.34