aboutsummaryrefslogtreecommitdiffstats
path: root/menu.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--menu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/menu.c b/menu.c
index 64ebd15..1e862ba 100644
--- a/menu.c
+++ b/menu.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: menu.c,v 1.60 2013/05/10 16:10:40 okan Exp $
+ * $OpenBSD: menu.c,v 1.61 2013/05/14 12:35:56 okan Exp $
*/
#include <sys/param.h>
@@ -419,7 +419,7 @@ menu_draw(struct screen_ctx *sc, struct menu_ctx *mc, struct menu_q *menuq,
mc->width, mc->height);
if (mc->hasprompt) {
- font_draw(sc, mc->dispstr, strlen(mc->dispstr), sc->menuwin, 0,
+ font_draw(sc, mc->dispstr, sc->menuwin, CWM_COLOR_MENU_FONT,
0, sc->xftfont->ascent);
n = 1;
} else
@@ -434,8 +434,7 @@ menu_draw(struct screen_ctx *sc, struct menu_ctx *mc, struct menu_q *menuq,
if (mc->y + y > xine.h)
break;
- font_draw(sc, text, MIN(strlen(text), MENU_MAXENTRY),
- sc->menuwin, 0, 0, y);
+ font_draw(sc, text, sc->menuwin, CWM_COLOR_MENU_FONT, 0, y);
n++;
}
if (mc->hasprompt && n > 1 && (mc->searchstr[0] != '\0')) {
@@ -466,7 +465,8 @@ menu_draw_entry(struct screen_ctx *sc, struct menu_ctx *mc,
XftDrawRect(sc->xftdraw, &sc->xftcolor[color], 0,
(sc->xftfont->height + 1) * entry, mc->width,
(sc->xftfont->height + 1) + sc->xftfont->descent);
- font_draw(sc, text, strlen(text), sc->menuwin, active,
+ color = active ? CWM_COLOR_MENU_FONT_SEL : CWM_COLOR_MENU_FONT;
+ font_draw(sc, text, sc->menuwin, color,
0, (sc->xftfont->height + 1) * entry + sc->xftfont->ascent + 1);
}