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 */
|
/* get indentation */
|
||||||
c = *highlight;
|
c = *highlight;
|
||||||
*highlight = '\0';
|
*highlight = '\0';
|
||||||
indent = TEXTW(itemtext);
|
indent = TEXTW(itemtext) - lrpad;
|
||||||
*highlight = c;
|
*highlight = c;
|
||||||
|
|
||||||
/* highlight character */
|
/* highlight character */
|
||||||
@ -41,9 +41,9 @@ drawhighlights(struct item *item, int x, int y, int maxw)
|
|||||||
highlight[1] = '\0';
|
highlight[1] = '\0';
|
||||||
drw_text(
|
drw_text(
|
||||||
drw,
|
drw,
|
||||||
x + indent - (lrpad / 2),
|
x + indent + (lrpad / 2),
|
||||||
y,
|
y,
|
||||||
MIN(maxw - indent, TEXTW(highlight) - lrpad),
|
MIN(maxw - indent + lrpad, TEXTW(highlight) - lrpad),
|
||||||
bh, 0, highlight, 0
|
bh, 0, highlight, 0
|
||||||
#if PANGO_PATCH
|
#if PANGO_PATCH
|
||||||
, True
|
, True
|
||||||
|
Loading…
Reference in New Issue
Block a user