[hackers] [dmenu] arrow offset || Connor Lane Smith

From: <hg_AT_suckless.org>
Date: Fri, 20 Aug 2010 18:57:18 +0000 (UTC)

changeset: 366:23bd778df432
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Fri Aug 20 19:57:13 2010 +0100
files: dmenu.c
description:
arrow offset

diff -r 6815880ca9d6 -r 23bd778df432 dmenu.c
--- a/dmenu.c Fri Aug 20 19:42:58 2010 +0100
+++ b/dmenu.c Fri Aug 20 19:57:13 2010 +0100
@@ -124,7 +124,7 @@
                         dc_drawtext(dc, "<", normcol);
                 for(item = curr; item != next; item = item->right) {
                         dc->x += dc->w;
- dc->w = MIN(dc_textw(dc, item->text), mw - dc->x);
+ dc->w = MIN(dc_textw(dc, item->text), mw - dc->x - dc_textw(dc, ">"));
                         dc_drawtext(dc, item->text, (item == sel) ? selcol : normcol);
                 }
                 dc->w = dc_textw(dc, ">");
Received on Fri Aug 20 2010 - 20:57:18 CEST

This archive was generated by hypermail 2.2.0 : Fri Aug 20 2010 - 21:00:07 CEST