[menu] Make the input width wide enough to hold its contents.

This commit is contained in:
Kris Maglione 2008-10-16 16:52:42 -04:00
parent f56c6edc86
commit 60ea1e5a30

View File

@ -127,7 +127,8 @@ menu_draw(void) {
r2 = r;
pad = (font->height & ~1);
inputw = min(Dx(r) / 3, maxwidth) + pad;
inputw = min(Dx(r) / 3, maxwidth);
inputw = max(inputw, textwidth(font, input.string)) + pad;
itemoff = inputw + 2 * ltwidth;
end = Dx(r) - ltwidth;