diff options
author | Anselm R. Garbe | 2006-08-24 11:47:08 +0200 |
---|---|---|
committer | Anselm R. Garbe | 2006-08-24 11:47:08 +0200 |
commit | e980c7ff1814b533f674eec535af6c5658b1bc62 (patch) | |
tree | 178d0389a8d9e203cac609373fe6f7bf360e4530 /main.c | |
parent | 7848b53dc3c8c05bd2cf1f10d59db2310456acf7 (diff) |
migrated dmenu to use 4 instead of 3 colors
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -77,17 +77,17 @@ drawmenu() dc.y = 0; dc.w = mw; dc.h = mh; - drawtext(NULL, False, False); + drawtext(NULL, 0, False); /* print command */ if(cmdw && item) dc.w = cmdw; - drawtext(text[0] ? text : NULL, False, False); + drawtext(text[0] ? text : NULL, 0, False); dc.x += cmdw; if(curr) { dc.w = SPACE; - drawtext((curr && curr->left) ? "<" : NULL, False, False); + drawtext((curr && curr->left) ? "<" : NULL, 0, False); dc.x += dc.w; /* determine maximum items */ @@ -95,13 +95,13 @@ drawmenu() dc.w = textw(i->text); if(dc.w > mw / 3) dc.w = mw / 3; - drawtext(i->text, sel == i, sel == i); + drawtext(i->text, sel == i ? 1 : 0, sel == i); dc.x += dc.w; } dc.x = mw - SPACE; dc.w = SPACE; - drawtext(next ? ">" : NULL, False, False); + drawtext(next ? ">" : NULL, 0, False); } XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, mw, mh, 0, 0); XFlush(dpy); @@ -315,9 +315,10 @@ main(int argc, char *argv[]) usleep(1000); /* style */ - dc.bg = getcolor(BGCOLOR); - dc.fg = getcolor(FGCOLOR); - dc.border = getcolor(BORDERCOLOR); + dc.bg[0] = getcolor(NORMBGCOLOR); + dc.fg[0] = getcolor(NORMFGCOLOR); + dc.bg[1] = getcolor(SELBGCOLOR); + dc.fg[1] = getcolor(SELFGCOLOR); setfont(FONT); wa.override_redirect = 1; |