diff options
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r-- | src/ui/inputwidget.c | 8 |
1 files changed, 3 insertions, 5 deletions
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) { | |||
36 | d->isSensitive = iFalse; | 36 | d->isSensitive = iFalse; |
37 | d->enterPressed = iFalse; | 37 | d->enterPressed = iFalse; |
38 | setMaxLen_InputWidget(d, maxLen); | 38 | setMaxLen_InputWidget(d, maxLen); |
39 | if (maxLen == 0) { | 39 | /* Caller must arrange the width, but the height is fixed. */ |
40 | /* Caller must arrange the width. */ | 40 | w->rect.size.y = lineHeight_Text(default_FontId) + 2 * gap_UI; |
41 | w->rect.size.y = lineHeight_Text(d->font) + 2 * gap_UI; | 41 | setFlags_Widget(w, fixedHeight_WidgetFlag, iTrue); |
42 | setFlags_Widget(w, fixedHeight_WidgetFlag, iTrue); | ||
43 | } | ||
44 | init_Click(&d->click, d, SDL_BUTTON_LEFT); | 42 | init_Click(&d->click, d, SDL_BUTTON_LEFT); |
45 | d->timer = 0; | 43 | d->timer = 0; |
46 | } | 44 | } |