diff --git a/libs/draw.c b/libs/draw.c index 01b146a..eb34aac 100644 --- a/libs/draw.c +++ b/libs/draw.c @@ -81,6 +81,8 @@ drawitemtext(struct item *item, int x, int y, int w) drw_text(drw, x, y, rw + lp, bh, lp, isrtl ? fribidi_text : buffer, 0, pango_item ? True : False); x += rw + lp; + w -= rw + lp; + orw += rw; // width of all colored text, we add this to the full width later ib = 1; lp = 0; @@ -139,8 +141,6 @@ drawitemtext(struct item *item, int x, int y, int w) buffer[wr] = '\0'; - w -= orw; - // now draw any non-colored text apply_fribidi(buffer); int r = drw_text(drw, x, y, w, bh, lp, isrtl ? fribidi_text : buffer, 0, pango_item ? True : False);