From 45a92070bf8681cf3b91ec784a2368e9653e9c5d Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 16 Aug 2020 16:46:56 +0300 Subject: InputWidget: Height should match LabelWidget --- src/ui/inputwidget.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/ui') diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index 66e2af0a..8534c54f 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c @@ -36,11 +36,9 @@ void init_InputWidget(iInputWidget *d, size_t maxLen) { d->isSensitive = iFalse; d->enterPressed = iFalse; setMaxLen_InputWidget(d, maxLen); - if (maxLen == 0) { - /* Caller must arrange the width. */ - w->rect.size.y = lineHeight_Text(d->font) + 2 * gap_UI; - setFlags_Widget(w, fixedHeight_WidgetFlag, iTrue); - } + /* Caller must arrange the width, but the height is fixed. */ + w->rect.size.y = lineHeight_Text(default_FontId) + 2 * gap_UI; + setFlags_Widget(w, fixedHeight_WidgetFlag, iTrue); init_Click(&d->click, d, SDL_BUTTON_LEFT); d->timer = 0; } -- cgit v1.2.3