summaryrefslogtreecommitdiff
path: root/src/ui/mobile.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-08-20 18:27:46 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-08-20 18:27:46 +0300
commitb7fe868ef9eda18ab1a537e5b77c269d4f1fd1b8 (patch)
tree30f49f9b1fcf1fa055e29617b40139dd10e1cf23 /src/ui/mobile.c
parente482b978ab37177a949fdeb7522e26672d440b0e (diff)
Added build options to force phone/tablet mobile UI
These options are mostly useful on mobile platforms that are not iOS or Android, and for testing purposes.
Diffstat (limited to 'src/ui/mobile.c')
-rw-r--r--src/ui/mobile.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/mobile.c b/src/ui/mobile.c
index 0ff3fe85..168a92b8 100644
--- a/src/ui/mobile.c
+++ b/src/ui/mobile.c
@@ -57,11 +57,13 @@ static enum iFontId labelBoldFont_(void) {
57 57
58static void updatePanelSheetMetrics_(iWidget *sheet) { 58static void updatePanelSheetMetrics_(iWidget *sheet) {
59 iWidget *navi = findChild_Widget(sheet, "panel.navi"); 59 iWidget *navi = findChild_Widget(sheet, "panel.navi");
60 iWidget *naviPad = child_Widget(navi, 0); 60// iWidget *naviPad = child_Widget(navi, 0);
61 int naviHeight = lineHeight_Text(labelFont_()) + 4 * gap_UI; 61 int naviHeight = lineHeight_Text(labelFont_()) + 4 * gap_UI;
62#if defined (iPlatformMobile)
63 float left = 0.0f, right = 0.0f, top = 0.0f, bottom = 0.0f;
62#if defined (iPlatformAppleMobile) 64#if defined (iPlatformAppleMobile)
63 float left, right, top, bottom;
64 safeAreaInsets_iOS(&left, &top, &right, &bottom); 65 safeAreaInsets_iOS(&left, &top, &right, &bottom);
66#endif
65 setPadding_Widget(sheet, left, 0, right, 0); 67 setPadding_Widget(sheet, left, 0, right, 0);
66 navi->rect.pos = init_I2(left, top); 68 navi->rect.pos = init_I2(left, top);
67 iConstForEach(PtrArray, i, findChildren_Widget(sheet, "panel.toppad")) { 69 iConstForEach(PtrArray, i, findChildren_Widget(sheet, "panel.toppad")) {