Xinqi Bao's Git
projects
/
dmenu.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
855a566
)
updated to libdraw tip
author
Connor Lane Smith <
[email protected]
>
Tue, 27 Jul 2010 12:40:32 +0000
(13:40 +0100)
committer
Connor Lane Smith <
[email protected]
>
Tue, 27 Jul 2010 12:40:32 +0000
(13:40 +0100)
dinput.c
diff
|
blob
|
history
dmenu.c
diff
|
blob
|
history
diff --git
a/dinput.c
b/dinput.c
index
e22bc35
..
e861afc
100644
(file)
--- a/
dinput.c
+++ b/
dinput.c
@@
-30,7
+30,7
@@
drawbar(void)
dc.y = 0;
dc.w = mw;
dc.h = mh;
dc.y = 0;
dc.w = mw;
dc.h = mh;
- draw
text(&dc, NULL
, normcol);
+ draw
box(&dc
, normcol);
/* print prompt? */
if(prompt) {
dc.w = promptw;
/* print prompt? */
if(prompt) {
dc.w = promptw;
diff --git
a/dmenu.c
b/dmenu.c
index
6fc414c
..
b460701
100644
(file)
--- a/
dmenu.c
+++ b/
dmenu.c
@@
-133,7
+133,7
@@
drawbar(void) {
dc.y = 0;
dc.w = mw;
dc.h = mh;
dc.y = 0;
dc.w = mw;
dc.h = mh;
- draw
text(&dc, NULL
, normcol);
+ draw
box(&dc
, normcol);
dc.h = dc.font.height + 2;
dc.y = topbar ? 0 : mh - dc.h;
/* print prompt? */
dc.h = dc.font.height + 2;
dc.y = topbar ? 0 : mh - dc.h;
/* print prompt? */
@@
-156,6
+156,7
@@
drawbar(void) {
void
drawmenuh(void) {
void
drawmenuh(void) {
+ unsigned long *col;
Item *i;
dc.x += cmdw;
Item *i;
dc.x += cmdw;
@@
-164,7
+165,9
@@
drawmenuh(void) {
dc.x += dc.w;
for(i = curr; i != next; i = i->right) {
dc.w = MIN(textw(&dc, i->text), mw / 3);
dc.x += dc.w;
for(i = curr; i != next; i = i->right) {
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.w = textw(&dc, ">");
dc.x += dc.w;
}
dc.w = textw(&dc, ">");