mirror of
https://github.com/mintycube/dmenu.git
synced 2024-10-22 14:05:48 +02:00
fuzzyhighlight: addressing graphical highlight glitch when lrpad is an odd number ref. #12
This commit is contained in:
parent
528481f7a6
commit
ae643ff68d
@ -33,7 +33,7 @@ drawhighlights(struct item *item, int x, int y, int maxw)
|
||||
/* get indentation */
|
||||
c = *highlight;
|
||||
*highlight = '\0';
|
||||
indent = TEXTW(itemtext);
|
||||
indent = TEXTW(itemtext) - lrpad;
|
||||
*highlight = c;
|
||||
|
||||
/* highlight character */
|
||||
@ -41,9 +41,9 @@ drawhighlights(struct item *item, int x, int y, int maxw)
|
||||
highlight[1] = '\0';
|
||||
drw_text(
|
||||
drw,
|
||||
x + indent - (lrpad / 2),
|
||||
x + indent + (lrpad / 2),
|
||||
y,
|
||||
MIN(maxw - indent, TEXTW(highlight) - lrpad),
|
||||
MIN(maxw - indent + lrpad, TEXTW(highlight) - lrpad),
|
||||
bh, 0, highlight, 0
|
||||
#if PANGO_PATCH
|
||||
, True
|
||||
|
Loading…
Reference in New Issue
Block a user