updated to libdraw tip
da7a7991
2 file(s) · +6 −3
| 30 | 30 | dc.y = 0; |
|
| 31 | 31 | dc.w = mw; |
|
| 32 | 32 | dc.h = mh; |
|
| 33 | - | drawtext(&dc, NULL, normcol); |
|
| 33 | + | drawbox(&dc, normcol); |
|
| 34 | 34 | /* print prompt? */ |
|
| 35 | 35 | if(prompt) { |
|
| 36 | 36 | dc.w = promptw; |
| 133 | 133 | dc.y = 0; |
|
| 134 | 134 | dc.w = mw; |
|
| 135 | 135 | dc.h = mh; |
|
| 136 | - | drawtext(&dc, NULL, normcol); |
|
| 136 | + | drawbox(&dc, normcol); |
|
| 137 | 137 | dc.h = dc.font.height + 2; |
|
| 138 | 138 | dc.y = topbar ? 0 : mh - dc.h; |
|
| 139 | 139 | /* print prompt? */ |
|
| 156 | 156 | ||
| 157 | 157 | void |
|
| 158 | 158 | drawmenuh(void) { |
|
| 159 | + | unsigned long *col; |
|
| 159 | 160 | Item *i; |
|
| 160 | 161 | ||
| 161 | 162 | dc.x += cmdw; |
|
| 164 | 165 | dc.x += dc.w; |
|
| 165 | 166 | for(i = curr; i != next; i = i->right) { |
|
| 166 | 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 | 171 | dc.x += dc.w; |
|
| 169 | 172 | } |
|
| 170 | 173 | dc.w = textw(&dc, ">"); |
|