fix: prompt increases image gaps

This commit is contained in:
speedie 2023-03-03 17:12:38 +01:00
parent 12791f4233
commit 2542474621

View file

@ -117,6 +117,7 @@ drawmenu(void)
unsigned int curpos; unsigned int curpos;
struct item *item; struct item *item;
int x = 0, y = 0, fh = drw->font->h, w; int x = 0, y = 0, fh = drw->font->h, w;
int ox = 0;
char *censort; char *censort;
drw_setscheme(drw, scheme[SchemeMenu]); drw_setscheme(drw, scheme[SchemeMenu]);
@ -136,6 +137,7 @@ drawmenu(void)
drw_setscheme(drw, scheme[SchemePrompt]); drw_setscheme(drw, scheme[SchemePrompt]);
} }
ox = x;
x = drw_text(drw, x, 0, promptw, bh, lrpad / 2, prompt, 0, pango_prompt ? True : False); x = drw_text(drw, x, 0, promptw, bh, lrpad / 2, prompt, 0, pango_prompt ? True : False);
} }
/* draw input field */ /* draw input field */
@ -175,6 +177,7 @@ drawmenu(void)
/* draw image first */ /* draw image first */
#if USEIMAGE #if USEIMAGE
if (!hideimage && longestedge != 0) { if (!hideimage && longestedge != 0) {
x = ox;
x += imagegaps + imagewidth; x += imagegaps + imagewidth;
} }
#endif #endif