diff options
author | Connor Lane Smith <cls@lubutu.com> | 2010-07-27 13:40:32 +0100 |
---|---|---|
committer | Connor Lane Smith <cls@lubutu.com> | 2010-07-27 13:40:32 +0100 |
commit | da7a79912124743e7fbbef81c2450aeaf4ccca87 (patch) | |
tree | e7cd14cc9b1fa6b6a19dec9cc6b8b5a3040934b8 | |
parent | 855a56631916bdff1438e11c232b88450f973648 (diff) |
updated to libdraw tip
-rw-r--r-- | dinput.c | 2 | ||||
-rw-r--r-- | dmenu.c | 7 |
2 files changed, 6 insertions, 3 deletions
@@ -30,7 +30,7 @@ drawbar(void) | |||
30 | dc.y = 0; | 30 | dc.y = 0; |
31 | dc.w = mw; | 31 | dc.w = mw; |
32 | dc.h = mh; | 32 | dc.h = mh; |
33 | drawtext(&dc, NULL, normcol); | 33 | drawbox(&dc, normcol); |
34 | /* print prompt? */ | 34 | /* print prompt? */ |
35 | if(prompt) { | 35 | if(prompt) { |
36 | dc.w = promptw; | 36 | dc.w = promptw; |
@@ -133,7 +133,7 @@ drawbar(void) { | |||
133 | dc.y = 0; | 133 | dc.y = 0; |
134 | dc.w = mw; | 134 | dc.w = mw; |
135 | dc.h = mh; | 135 | dc.h = mh; |
136 | drawtext(&dc, NULL, normcol); | 136 | drawbox(&dc, normcol); |
137 | dc.h = dc.font.height + 2; | 137 | dc.h = dc.font.height + 2; |
138 | dc.y = topbar ? 0 : mh - dc.h; | 138 | dc.y = topbar ? 0 : mh - dc.h; |
139 | /* print prompt? */ | 139 | /* print prompt? */ |
@@ -156,6 +156,7 @@ drawbar(void) { | |||
156 | 156 | ||
157 | void | 157 | void |
158 | drawmenuh(void) { | 158 | drawmenuh(void) { |
159 | unsigned long *col; | ||
159 | Item *i; | 160 | Item *i; |
160 | 161 | ||
161 | dc.x += cmdw; | 162 | dc.x += cmdw; |
@@ -164,7 +165,9 @@ drawmenuh(void) { | |||
164 | dc.x += dc.w; | 165 | dc.x += dc.w; |
165 | for(i = curr; i != next; i = i->right) { | 166 | for(i = curr; i != next; i = i->right) { |
166 | dc.w = MIN(textw(&dc, i->text), mw / 3); | 167 | dc.w = MIN(textw(&dc, i->text), mw / 3); |
167 | drawtext(&dc, i->text, (sel == i) ? selcol : normcol); | 168 | col = (sel == i) ? selcol : normcol; |
169 | drawbox(&dc, col); | ||
170 | drawtext(&dc, i->text, col); | ||
168 | dc.x += dc.w; | 171 | dc.x += dc.w; |
169 | } | 172 | } |
170 | dc.w = textw(&dc, ">"); | 173 | dc.w = textw(&dc, ">"); |