[hackers] [dmenu] updated to libdraw tip || Connor Lane Smith

From: <hg_AT_suckless.org>
Date: Tue, 27 Jul 2010 12:40:42 +0000 (UTC)

changeset: 338:9774212f4b4b
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Tue Jul 27 13:40:32 2010 +0100
files: dinput.c dmenu.c
description:
updated to libdraw tip

diff -r 67d8f41d51d7 -r 9774212f4b4b dinput.c
--- a/dinput.c Fri Jul 02 06:49:05 2010 +0100
+++ b/dinput.c Tue Jul 27 13:40:32 2010 +0100
@@ -30,7 +30,7 @@
         dc.y = 0;
         dc.w = mw;
         dc.h = mh;
- drawtext(&dc, NULL, normcol);
+ drawbox(&dc, normcol);
         /* print prompt? */
         if(prompt) {
                 dc.w = promptw;
diff -r 67d8f41d51d7 -r 9774212f4b4b dmenu.c
--- a/dmenu.c Fri Jul 02 06:49:05 2010 +0100
+++ b/dmenu.c Tue Jul 27 13:40:32 2010 +0100
@@ -133,7 +133,7 @@
         dc.y = 0;
         dc.w = mw;
         dc.h = mh;
- drawtext(&dc, NULL, normcol);
+ drawbox(&dc, normcol);
         dc.h = dc.font.height + 2;
         dc.y = topbar ? 0 : mh - dc.h;
         /* print prompt? */
@@ -156,6 +156,7 @@
 
 void
 drawmenuh(void) {
+ unsigned long *col;
         Item *i;
 
         dc.x += cmdw;
@@ -164,7 +165,9 @@
         dc.x += dc.w;
         for(i = curr; i != next; i = i->right) {
                 dc.w = MIN(textw(&dc, i->text), mw / 3);
- drawtext(&dc, i->text, (sel == i) ? selcol : normcol);
+ col = (sel == i) ? selcol : normcol;
+ drawbox(&dc, col);
+ drawtext(&dc, i->text, col);
                 dc.x += dc.w;
         }
         dc.w = textw(&dc, ">");
Received on Tue Jul 27 2010 - 14:40:42 CEST

This archive was generated by hypermail 2.2.0 : Tue Jul 27 2010 - 14:48:04 CEST