changeset: 340:f6cbb17a83ea
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Fri Jul 30 10:25:55 2010 +0100
files: dinput.c dmenu.c
description:
new libdraw
diff -r 872ed8504d6b -r f6cbb17a83ea dinput.c
--- a/dinput.c Fri Jul 30 09:18:35 2010 +0100
+++ b/dinput.c Fri Jul 30 10:25:55 2010 +0100
@@ -34,12 +34,14 @@
/* print prompt? */
if(prompt) {
dc.w = promptw;
+ drawbox(&dc, selcol);
drawtext(&dc, prompt, selcol);
dc.x += dc.w;
}
dc.w = mw - dc.x;
drawtext(&dc, text, normcol);
- drawcursor(&dc, text, cursor, normcol);
+ drawline(&dc, textnw(&dc, text, cursor) + dc.font.height/2, 2, 1,
+ dc.font.height-2, normcol);
commitdraw(&dc, win);
}
diff -r 872ed8504d6b -r f6cbb17a83ea dmenu.c
--- a/dmenu.c Fri Jul 30 09:18:35 2010 +0100
+++ b/dmenu.c Fri Jul 30 10:25:55 2010 +0100
@@ -24,7 +24,7 @@
static char *cistrstr(const char *s, const char *sub);
static void cleanup(void);
static void dinput(void);
-static void drawitem(char *s, unsigned long col[ColLast]);
+static void drawitem(const char *s, unsigned long col[ColLast]);
static void drawmenuh(void);
static void drawmenuv(void);
static void match(void);
@@ -140,6 +140,7 @@
/* print prompt? */
if(prompt) {
dc.w = promptw;
+ drawbox(&dc, selcol);
drawtext(&dc, prompt, selcol);
dc.x += dc.w;
}
@@ -156,7 +157,7 @@
}
void
-drawitem(char *s, unsigned long col[ColLast]) {
+drawitem(const char *s, unsigned long col[ColLast]) {
drawbox(&dc, col);
drawtext(&dc, s, col);
}
Received on Fri Jul 30 2010 - 11:26:34 CEST
This archive was generated by hypermail 2.2.0 : Fri Jul 30 2010 - 11:36:04 CEST