about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-08-24 09:41:41 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-08-24 09:41:41 +0200
commitc976bc6c2cbc2f197806259b58a6c6ff2d154284 (patch)
treeab76b3fc8ba593f5c66abc50e8d4e11b5c27e5e5
parent2e834e941f695481894123e0665416f96333653b (diff)
downloaddwm-c976bc6c2cbc2f197806259b58a6c6ff2d154284.tar.gz
found less intrusive way
-rw-r--r--draw.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/draw.c b/draw.c
index 4ebda12..f73a7bd 100644
--- a/draw.c
+++ b/draw.c
@@ -22,7 +22,7 @@ textnw(const char *text, unsigned int len)
 }
 
 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 @@ drawtext(const char *text, Bool invert, Bool underline)
 		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);
 	}
 }
 
89862d'>^
0d9c300b ^






6bad38c2 ^
0d9c300b ^





6bad38c2 ^
6b1b035d ^
0d9c300b ^

0d9c300b ^

e49bea4d ^





0d9c300b ^

6bad38c2 ^
0d9c300b ^











6bad38c2 ^
0d9c300b ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88