diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-27 13:25:44 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-27 13:25:44 +0300 |
commit | 379c1f8befcc30b72f0b50dcbd653704348e4761 (patch) | |
tree | a43c0d30f39e592237bf7f3b9c8fca26434128d0 /src/ui/inputwidget.c | |
parent | 3846778c99d9efca609b7cb216cb71c675f036b0 (diff) |
UI root sizing is independent of window sizing
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r-- | src/ui/inputwidget.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index df5eb0df..52cb9805 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -338,7 +338,7 @@ void setText_InputWidget(iInputWidget *d, const iString *text) { | |||
338 | text = enc; | 338 | text = enc; |
339 | } | 339 | } |
340 | /* Omit the default (Gemini) scheme if there isn't much space. */ | 340 | /* Omit the default (Gemini) scheme if there isn't much space. */ |
341 | if (isNarrow_Window(get_Window())) { // flags_Widget(as_Widget(d)) & tight_WidgetFlag) { | 341 | if (isNarrow_Root(get_Root())) { // flags_Widget(as_Widget(d)) & tight_WidgetFlag) { |
342 | text = omitDefaultScheme_(collect_String(copy_String(text))); | 342 | text = omitDefaultScheme_(collect_String(copy_String(text))); |
343 | } | 343 | } |
344 | } | 344 | } |
@@ -733,7 +733,7 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) { | |||
733 | if (isFocused_Widget(d) && arg_Command(command_UserEvent(ev))) { | 733 | if (isFocused_Widget(d) && arg_Command(command_UserEvent(ev))) { |
734 | iRect rect = bounds_Widget(w); | 734 | iRect rect = bounds_Widget(w); |
735 | rect.pos.y -= value_Anim(&get_Window()->rootOffset); | 735 | rect.pos.y -= value_Anim(&get_Window()->rootOffset); |
736 | const iInt2 visRoot = visibleRootSize_Window(get_Window()); | 736 | const iInt2 visRoot = visibleSize_Root(get_Root()); |
737 | if (bottom_Rect(rect) > visRoot.y) { | 737 | if (bottom_Rect(rect) > visRoot.y) { |
738 | setValue_Anim(&get_Window()->rootOffset, -(bottom_Rect(rect) - visRoot.y), 250); | 738 | setValue_Anim(&get_Window()->rootOffset, -(bottom_Rect(rect) - visRoot.y), 250); |
739 | } | 739 | } |