From 0e7060d5306fef1f585982cc78223250d3ee8551 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 12 Sep 2021 21:00:44 +0300 Subject: Mobile: Better Settings tap targets; fixed safe area drawing --- src/ui/util.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/ui/util.c') diff --git a/src/ui/util.c b/src/ui/util.c index 05d39c01..48ed41a6 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -1349,10 +1349,17 @@ iWidget *makeValueInput_Widget(iWidget *parent, const iString *initialValue, con 2))); // finalizeSheet_Mobile(dlg); arrange_Widget(dlg); - setupSheetTransition_Mobile(dlg, incoming_TransitionFlag | top_TransitionDir); if (parent) { setFocus_Widget(as_Widget(input)); } + /* Check that the top is in the safe area. */ { + int top = top_Rect(bounds_Widget(dlg)); + int delta = top - top_Rect(safeRect_Root(dlg->root)); + if (delta < 0) { + dlg->rect.pos.y -= delta; + } + } + setupSheetTransition_Mobile(dlg, incoming_TransitionFlag | top_TransitionDir); return dlg; } -- cgit v1.2.3