diff options
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r-- | src/ui/inputwidget.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index 2de16e6e..5d74f855 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -59,6 +59,9 @@ static const int unlimitedWidth_InputWidget_ = 1000000; /* TODO: WrapText di | |||
59 | static const iChar sensitiveChar_ = 0x25cf; /* black circle */ | 59 | static const iChar sensitiveChar_ = 0x25cf; /* black circle */ |
60 | static const char * sensitive_ = "\u25cf"; | 60 | static const char * sensitive_ = "\u25cf"; |
61 | 61 | ||
62 | #define extraPaddingHeight_ ((isPortraitPhone_App() ? 3.0f : 1.25f) * gap_UI) /* phone: proper tap target */ | ||
63 | #define minWidth_InputWidget_ (3 * gap_UI) | ||
64 | |||
62 | static void enableEditorKeysInMenus_(iBool enable) { | 65 | static void enableEditorKeysInMenus_(iBool enable) { |
63 | #if defined (iPlatformAppleDesktop) | 66 | #if defined (iPlatformAppleDesktop) |
64 | enableMenuItemsByKey_MacOS(SDLK_LEFT, KMOD_PRIMARY, enable); | 67 | enableMenuItemsByKey_MacOS(SDLK_LEFT, KMOD_PRIMARY, enable); |
@@ -228,7 +231,7 @@ struct Impl_InputWidget { | |||
228 | size_t maxLen; /* characters */ | 231 | size_t maxLen; /* characters */ |
229 | iString srcHint; | 232 | iString srcHint; |
230 | iString hint; | 233 | iString hint; |
231 | int leftPadding; | 234 | int leftPadding; /* additional padding between frame and content */ |
232 | int rightPadding; | 235 | int rightPadding; |
233 | int minWrapLines, maxWrapLines; /* min/max number of visible lines allowed */ | 236 | int minWrapLines, maxWrapLines; /* min/max number of visible lines allowed */ |
234 | iRangei visWrapLines; /* which wrap lines are current visible */ | 237 | iRangei visWrapLines; /* which wrap lines are current visible */ |
@@ -359,8 +362,6 @@ static const iInputLine *line_InputWidget_(const iInputWidget *d, size_t index) | |||
359 | 362 | ||
360 | #endif /* !LAGRANGE_USE_SYSTEM_TEXT_INPUT */ | 363 | #endif /* !LAGRANGE_USE_SYSTEM_TEXT_INPUT */ |
361 | 364 | ||
362 | #define extraPaddingHeight_ (1.25f * gap_UI) | ||
363 | |||
364 | static iRect contentBounds_InputWidget_(const iInputWidget *d) { | 365 | static iRect contentBounds_InputWidget_(const iInputWidget *d) { |
365 | const iWidget *w = constAs_Widget(d); | 366 | const iWidget *w = constAs_Widget(d); |
366 | iRect bounds = adjusted_Rect(bounds_Widget(w), | 367 | iRect bounds = adjusted_Rect(bounds_Widget(w), |
@@ -374,8 +375,6 @@ static iRect contentBounds_InputWidget_(const iInputWidget *d) { | |||
374 | return bounds; | 375 | return bounds; |
375 | } | 376 | } |
376 | 377 | ||
377 | #define minWidth_InputWidget_ (3 * gap_UI) | ||
378 | |||
379 | static iWrapText wrap_InputWidget_(const iInputWidget *d, int y) { | 378 | static iWrapText wrap_InputWidget_(const iInputWidget *d, int y) { |
380 | #if LAGRANGE_USE_SYSTEM_TEXT_INPUT | 379 | #if LAGRANGE_USE_SYSTEM_TEXT_INPUT |
381 | iUnused(y); /* full text is wrapped always */ | 380 | iUnused(y); /* full text is wrapped always */ |