mirror of git://git.suckless.org/dmenu
updated to libdraw tip
This commit is contained in:
parent
855a566319
commit
da7a799121
2
dinput.c
2
dinput.c
|
@ -30,7 +30,7 @@ drawbar(void)
|
||||||
dc.y = 0;
|
dc.y = 0;
|
||||||
dc.w = mw;
|
dc.w = mw;
|
||||||
dc.h = mh;
|
dc.h = mh;
|
||||||
drawtext(&dc, NULL, normcol);
|
drawbox(&dc, normcol);
|
||||||
/* print prompt? */
|
/* print prompt? */
|
||||||
if(prompt) {
|
if(prompt) {
|
||||||
dc.w = promptw;
|
dc.w = promptw;
|
||||||
|
|
7
dmenu.c
7
dmenu.c
|
@ -133,7 +133,7 @@ drawbar(void) {
|
||||||
dc.y = 0;
|
dc.y = 0;
|
||||||
dc.w = mw;
|
dc.w = mw;
|
||||||
dc.h = mh;
|
dc.h = mh;
|
||||||
drawtext(&dc, NULL, normcol);
|
drawbox(&dc, normcol);
|
||||||
dc.h = dc.font.height + 2;
|
dc.h = dc.font.height + 2;
|
||||||
dc.y = topbar ? 0 : mh - dc.h;
|
dc.y = topbar ? 0 : mh - dc.h;
|
||||||
/* print prompt? */
|
/* print prompt? */
|
||||||
|
@ -156,6 +156,7 @@ drawbar(void) {
|
||||||
|
|
||||||
void
|
void
|
||||||
drawmenuh(void) {
|
drawmenuh(void) {
|
||||||
|
unsigned long *col;
|
||||||
Item *i;
|
Item *i;
|
||||||
|
|
||||||
dc.x += cmdw;
|
dc.x += cmdw;
|
||||||
|
@ -164,7 +165,9 @@ drawmenuh(void) {
|
||||||
dc.x += dc.w;
|
dc.x += dc.w;
|
||||||
for(i = curr; i != next; i = i->right) {
|
for(i = curr; i != next; i = i->right) {
|
||||||
dc.w = MIN(textw(&dc, i->text), mw / 3);
|
dc.w = MIN(textw(&dc, i->text), mw / 3);
|
||||||
drawtext(&dc, i->text, (sel == i) ? selcol : normcol);
|
col = (sel == i) ? selcol : normcol;
|
||||||
|
drawbox(&dc, col);
|
||||||
|
drawtext(&dc, i->text, col);
|
||||||
dc.x += dc.w;
|
dc.x += dc.w;
|
||||||
}
|
}
|
||||||
dc.w = textw(&dc, ">");
|
dc.w = textw(&dc, ">");
|
||||||
|
|
Loading…
Reference in New Issue