removed unnecessary border color
30561a01
5 file(s) · +0 −25
| 11 | 11 | #define FONT "-*-terminus-medium-*-*-*-12-*-*-*-*-*-iso10646-*" |
|
| 12 | 12 | #define BGCOLOR "#eeeeee" |
|
| 13 | 13 | #define FGCOLOR "#666699" |
|
| 14 | - | #define BORDERCOLOR "#9999CC" |
|
| 15 | 14 | #define MODKEY Mod1Mask |
|
| 16 | 15 | #define NUMLOCKMASK Mod2Mask |
|
| 17 | 16 | #define MASTERW 60 /* percent */ |
| 11 | 11 | #define FONT "fixed" |
|
| 12 | 12 | #define BGCOLOR "#666699" |
|
| 13 | 13 | #define FGCOLOR "#eeeeee" |
|
| 14 | - | #define BORDERCOLOR "#9999CC" |
|
| 15 | 14 | #define MODKEY Mod1Mask |
|
| 16 | 15 | #define NUMLOCKMASK Mod2Mask |
|
| 17 | 16 | #define MASTERW 60 /* percent */ |
| 9 | 9 | ||
| 10 | 10 | /* static */ |
|
| 11 | 11 | ||
| 12 | - | static void |
|
| 13 | - | drawborder(void) |
|
| 14 | - | { |
|
| 15 | - | XPoint points[5]; |
|
| 16 | - | ||
| 17 | - | XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); |
|
| 18 | - | XSetForeground(dpy, dc.gc, dc.border); |
|
| 19 | - | points[0].x = dc.x; |
|
| 20 | - | points[0].y = dc.y; |
|
| 21 | - | points[1].x = dc.w - 1; |
|
| 22 | - | points[1].y = 0; |
|
| 23 | - | points[2].x = 0; |
|
| 24 | - | points[2].y = dc.h - 1; |
|
| 25 | - | points[3].x = -(dc.w - 1); |
|
| 26 | - | points[3].y = 0; |
|
| 27 | - | points[4].x = 0; |
|
| 28 | - | points[4].y = -(dc.h - 1); |
|
| 29 | - | XDrawLines(dpy, dc.drawable, dc.gc, points, 5, CoordModePrevious); |
|
| 30 | - | } |
|
| 31 | - | ||
| 32 | 12 | static unsigned int |
|
| 33 | 13 | textnw(const char *text, unsigned int len) |
|
| 34 | 14 | { |
|
| 52 | 32 | ||
| 53 | 33 | XSetForeground(dpy, dc.gc, invert ? dc.fg : dc.bg); |
|
| 54 | 34 | XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1); |
|
| 55 | - | drawborder(); |
|
| 56 | 35 | ||
| 57 | 36 | if(!text) |
|
| 58 | 37 | return; |
|
| 43 | 43 | int x, y, w, h; |
|
| 44 | 44 | unsigned long bg; |
|
| 45 | 45 | unsigned long fg; |
|
| 46 | - | unsigned long border; |
|
| 47 | 46 | Drawable drawable; |
|
| 48 | 47 | Fnt font; |
|
| 49 | 48 | GC gc; |
| 217 | 217 | /* style */ |
|
| 218 | 218 | dc.bg = getcolor(BGCOLOR); |
|
| 219 | 219 | dc.fg = getcolor(FGCOLOR); |
|
| 220 | - | dc.border = getcolor(BORDERCOLOR); |
|
| 221 | 220 | setfont(FONT); |
|
| 222 | 221 | ||
| 223 | 222 | sx = sy = 0; |