removed unnecessary border color 4318bf29
Anselm R.Garbe · 2006-08-10 10:28 5 file(s) · +7 −34
config.arg.h +0 −1
6 6
#define FONT			"-*-terminus-medium-*-*-*-12-*-*-*-*-*-iso10646-*"
7 7
#define BGCOLOR			"#eeeeee"
8 8
#define FGCOLOR			"#666699"
9 -
#define BORDERCOLOR		"#9999CC"
config.default.h +0 −1
6 6
#define FONT			"fixed"
7 7
#define BGCOLOR			"#666699"
8 8
#define FGCOLOR			"#eeeeee"
9 -
#define BORDERCOLOR		"#9999CC"
dmenu.h +1 −2
24 24
	int x, y, w, h;
25 25
	unsigned long bg;
26 26
	unsigned long fg;
27 -
	unsigned long border;
28 27
	Drawable drawable;
29 28
	Fnt font;
30 29
	GC gc;
35 34
extern DC dc;
36 35
37 36
/* draw.c */
38 -
extern void drawtext(const char *text, Bool invert, Bool border);
37 +
extern void drawtext(const char *text, Bool invert);
39 38
extern unsigned long getcolor(const char *colstr);
40 39
extern void setfont(const char *fontstr);
41 40
extern unsigned int textw(const char *text);
draw.c +1 −24
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
{
44 24
/* extern */
45 25
46 26
void
47 -
drawtext(const char *text, Bool invert, Bool border)
27 +
drawtext(const char *text, Bool invert)
48 28
{
49 29
	int x, y, w, h;
50 30
	static char buf[256];
54 34
55 35
	XSetForeground(dpy, dc.gc, invert ? dc.fg : dc.bg);
56 36
	XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
57 -
58 37
	w = 0;
59 -
	if(border)
60 -
		drawborder();
61 38
62 39
	if(!text)
63 40
		return;
main.c +5 −6
77 77
	dc.y = 0;
78 78
	dc.w = mw;
79 79
	dc.h = mh;
80 -
	drawtext(NULL, False, False);
80 +
	drawtext(NULL, False);
81 81
82 82
	/* print command */
83 83
	if(cmdw && item)
84 84
		dc.w = cmdw;
85 -
	drawtext(text[0] ? text : NULL, False, False);
85 +
	drawtext(text[0] ? text : NULL, False);
86 86
	dc.x += cmdw;
87 87
88 88
	if(curr) {
89 89
		dc.w = SPACE;
90 -
		drawtext((curr && curr->left) ? "<" : NULL, False, False);
90 +
		drawtext((curr && curr->left) ? "<" : NULL, False);
91 91
		dc.x += dc.w;
92 92
93 93
		/* determine maximum items */
95 95
			dc.w = textw(i->text);
96 96
			if(dc.w > mw / 3)
97 97
				dc.w = mw / 3;
98 -
			drawtext(i->text, sel == i, sel == i);
98 +
			drawtext(i->text, sel == i);
99 99
			dc.x += dc.w;
100 100
		}
101 101
102 102
		dc.x = mw - SPACE;
103 103
		dc.w = SPACE;
104 -
		drawtext(next ? ">" : NULL, False, False);
104 +
		drawtext(next ? ">" : NULL, False);
105 105
	}
106 106
	XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, mw, mh, 0, 0);
107 107
	XFlush(dpy);
316 316
	/* style */
317 317
	dc.bg = getcolor(BGCOLOR);
318 318
	dc.fg = getcolor(FGCOLOR);
319 -
	dc.border = getcolor(BORDERCOLOR);
320 319
	setfont(FONT);
321 320
322 321
	wa.override_redirect = 1;