diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-09 22:44:45 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-09 22:44:45 +0200 |
commit | 2002543dbedcc1666d02d11fbde55f794d692bb7 (patch) | |
tree | 853412e7593d4a1ca3f0ccdc5ca31466a3400463 /src/ui/window.c | |
parent | 5ccb0e0096dff6c2bbdfa959610620a14fdc918d (diff) |
Mobile: Revising phone-style dialogs
Sliding panels and left-edge swipes.
Diffstat (limited to 'src/ui/window.c')
-rw-r--r-- | src/ui/window.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index 3c362986..af9b20ba 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -1808,6 +1808,16 @@ iInt2 rootSize_Window(const iWindow *d) { | |||
1808 | return d ? d->root->rect.size : zero_I2(); | 1808 | return d ? d->root->rect.size : zero_I2(); |
1809 | } | 1809 | } |
1810 | 1810 | ||
1811 | iRect safeRootRect_Window(const iWindow *d) { | ||
1812 | iRect rect = { zero_I2(), d->root->rect.size }; | ||
1813 | #if defined (iPlatformAppleMobile) | ||
1814 | float left, top, right, bottom; | ||
1815 | safeAreaInsets_iOS(&left, &top, &right, &bottom); | ||
1816 | adjustEdges_Rect(&rect, top, right, bottom, left); | ||
1817 | #endif | ||
1818 | return rect; | ||
1819 | } | ||
1820 | |||
1811 | iInt2 visibleRootSize_Window(const iWindow *d) { | 1821 | iInt2 visibleRootSize_Window(const iWindow *d) { |
1812 | return addY_I2(rootSize_Window(d), -d->keyboardHeight); | 1822 | return addY_I2(rootSize_Window(d), -d->keyboardHeight); |
1813 | } | 1823 | } |