diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-16 16:46:56 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-16 16:46:56 +0300 |
commit | 45a92070bf8681cf3b91ec784a2368e9653e9c5d (patch) | |
tree | fc2476913ad9f02ac8e1239bac6cfa8220a560a0 /src/ui | |
parent | 027d8185b10632092508bfda62467d24c9f8655b (diff) |
InputWidget: Height should match LabelWidget
Diffstat (limited to 'src/ui')
-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 | } |