diff options
-rw-r--r-- | dinput.c | 4 | ||||
-rw-r--r-- | dmenu.c | 5 |
2 files changed, 6 insertions, 3 deletions
@@ -34,12 +34,14 @@ drawbar(void) | |||
34 | /* print prompt? */ | 34 | /* print prompt? */ |
35 | if(prompt) { | 35 | if(prompt) { |
36 | dc.w = promptw; | 36 | dc.w = promptw; |
37 | drawbox(&dc, selcol); | ||
37 | drawtext(&dc, prompt, selcol); | 38 | drawtext(&dc, prompt, selcol); |
38 | dc.x += dc.w; | 39 | dc.x += dc.w; |
39 | } | 40 | } |
40 | dc.w = mw - dc.x; | 41 | dc.w = mw - dc.x; |
41 | drawtext(&dc, text, normcol); | 42 | drawtext(&dc, text, normcol); |
42 | drawcursor(&dc, text, cursor, normcol); | 43 | drawline(&dc, textnw(&dc, text, cursor) + dc.font.height/2, 2, 1, |
44 | dc.font.height-2, normcol); | ||
43 | commitdraw(&dc, win); | 45 | commitdraw(&dc, win); |
44 | } | 46 | } |
45 | 47 | ||
@@ -24,7 +24,7 @@ static void calcoffsetsv(void); | |||
24 | static char *cistrstr(const char *s, const char *sub); | 24 | static char *cistrstr(const char *s, const char *sub); |
25 | static void cleanup(void); | 25 | static void cleanup(void); |
26 | static void dinput(void); | 26 | static void dinput(void); |
27 | static void drawitem(char *s, unsigned long col[ColLast]); | 27 | static void drawitem(const char *s, unsigned long col[ColLast]); |
28 | static void drawmenuh(void); | 28 | static void drawmenuh(void); |
29 | static void drawmenuv(void); | 29 | static void drawmenuv(void); |
30 | static void match(void); | 30 | static void match(void); |
@@ -140,6 +140,7 @@ drawbar(void) { | |||
140 | /* print prompt? */ | 140 | /* print prompt? */ |
141 | if(prompt) { | 141 | if(prompt) { |
142 | dc.w = promptw; | 142 | dc.w = promptw; |
143 | drawbox(&dc, selcol); | ||
143 | drawtext(&dc, prompt, selcol); | 144 | drawtext(&dc, prompt, selcol); |
144 | dc.x += dc.w; | 145 | dc.x += dc.w; |
145 | } | 146 | } |
@@ -156,7 +157,7 @@ drawbar(void) { | |||
156 | } | 157 | } |
157 | 158 | ||
158 | void | 159 | void |
159 | drawitem(char *s, unsigned long col[ColLast]) { | 160 | drawitem(const char *s, unsigned long col[ColLast]) { |
160 | drawbox(&dc, col); | 161 | drawbox(&dc, col); |
161 | drawtext(&dc, s, col); | 162 | drawtext(&dc, s, col); |
162 | } | 163 | } |