summaryrefslogtreecommitdiff
path: root/src/ui/lookupwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-19 13:15:08 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-19 13:15:08 +0200
commit7a0980fd58308f7333254a1276e6dd5072326d98 (patch)
tree8431dfd498762a90944bb5e595f61ea2af914a81 /src/ui/lookupwidget.c
parent63dc07ddbecfdf0be7c0bd98c53e492628dda98b (diff)
iOS: Adjusting the UI for a tablet screen
Diffstat (limited to 'src/ui/lookupwidget.c')
-rw-r--r--src/ui/lookupwidget.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ui/lookupwidget.c b/src/ui/lookupwidget.c
index 123ac6c4..ab0a009a 100644
--- a/src/ui/lookupwidget.c
+++ b/src/ui/lookupwidget.c
@@ -377,6 +377,9 @@ void init_LookupWidget(iLookupWidget *d) {
377 init_Widget(w); 377 init_Widget(w);
378 setId_Widget(w, "lookup"); 378 setId_Widget(w, "lookup");
379 setFlags_Widget(w, focusable_WidgetFlag | resizeChildren_WidgetFlag, iTrue); 379 setFlags_Widget(w, focusable_WidgetFlag | resizeChildren_WidgetFlag, iTrue);
380#if defined (iPlatformAppleMobile)
381 setFlags_Widget(w, unhittable_WidgetFlag, iTrue);
382#endif
380 d->list = addChild_Widget(w, iClob(new_ListWidget())); 383 d->list = addChild_Widget(w, iClob(new_ListWidget()));
381 setItemHeight_ListWidget(d->list, lineHeight_Text(uiContent_FontId) * 1.25f); 384 setItemHeight_ListWidget(d->list, lineHeight_Text(uiContent_FontId) * 1.25f);
382 d->cursor = iInvalidPos; 385 d->cursor = iInvalidPos;
@@ -639,6 +642,14 @@ static iBool processEvent_LookupWidget_(iLookupWidget *d, const SDL_Event *ev) {
639 /* Position the lookup popup under the URL bar. */ { 642 /* Position the lookup popup under the URL bar. */ {
640 setSize_Widget(w, init_I2(width_Widget(findWidget_App("url")), 643 setSize_Widget(w, init_I2(width_Widget(findWidget_App("url")),
641 get_Window()->root->rect.size.y / 2)); 644 get_Window()->root->rect.size.y / 2));
645#if defined (iPlatformAppleMobile)
646 /* TODO: Ask the system how tall the keyboard is. */ {
647 const iInt2 rootSize = rootSize_Window(get_Window());
648 if (rootSize.x > rootSize.y) {
649 w->rect.size.y = rootSize.y * 4 / 10;
650 }
651 }
652#endif
642 setPos_Widget(w, bottomLeft_Rect(bounds_Widget(findWidget_App("url")))); 653 setPos_Widget(w, bottomLeft_Rect(bounds_Widget(findWidget_App("url"))));
643 arrange_Widget(w); 654 arrange_Widget(w);
644 } 655 }