From 8050511b683d89c5ef907bc461b98e9aaaa051a7 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 4 Dec 2021 19:18:41 +0200 Subject: iOS: Right-aligned input fields --- src/ios.m | 2 +- src/ui/inputwidget.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ios.m b/src/ios.m index be1e644f..59d02fc4 100644 --- a/src/ios.m +++ b/src/ios.m @@ -663,7 +663,7 @@ void init_SystemTextInput(iSystemTextInput *d, int flags) { [field setAutocapitalizationType:UITextAutocapitalizationTypeNone]; [field setSpellCheckingType:UITextSpellCheckingTypeNo]; } - if (flags & alignRight_WidgetFlag) { + if (flags & alignRight_SystemTextInputFlag) { [field setTextAlignment:NSTextAlignmentRight]; } [field setDelegate:appState_]; diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index e72ed361..1c6b8d9e 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c @@ -1051,8 +1051,8 @@ void begin_InputWidget(iInputWidget *d) { mergeLines_(&d->lines, &d->oldText); #if defined (LAGRANGE_ENABLE_SYSTEM_INPUT) d->sysCtrl = new_SystemTextInput((d->inFlags & isUrl_InputWidgetFlag ? disableAutocorrect_SystemTextInputFlag : 0) | - (!cmp_String(id_Widget(w), "url") ? returnGo_SystemTextInputFlags : 0) ); -// (flags_Widget(w) & alignRight_WidgetFlag ? alignRight_SystemTextInputFlag : 0)); + (!cmp_String(id_Widget(w), "url") ? returnGo_SystemTextInputFlags : 0) | + (flags_Widget(w) & alignRight_WidgetFlag ? alignRight_SystemTextInputFlag : 0)); setFont_SystemTextInput(d->sysCtrl, d->font); setRect_SystemTextInput(d->sysCtrl, contentBounds_InputWidget_(d)); setText_SystemTextInput(d->sysCtrl, &d->oldText); -- cgit v1.2.3