diff --git a/nymea-app/ui/Configuration.qml b/nymea-app/ui/Configuration.qml index 60f5afb7..83d4f229 100644 --- a/nymea-app/ui/Configuration.qml +++ b/nymea-app/ui/Configuration.qml @@ -32,6 +32,7 @@ ConfigurationBase { company: "chargebyte GmbH" connectionWizard: "/ui/connection/ConnectionWizard.qml" + iosSafeAreaBottomMarginScale: 1.0 magicEnabled: true networkSettingsEnabled: true diff --git a/nymea-app/ui/ConfigurationBase.qml b/nymea-app/ui/ConfigurationBase.qml index 9f77919d..36292715 100644 --- a/nymea-app/ui/ConfigurationBase.qml +++ b/nymea-app/ui/ConfigurationBase.qml @@ -53,6 +53,9 @@ Item { property string alternativeMainPage: "" + // iOS only: scales the safe area bottom inset before applying it as bottom margin. + property real iosSafeAreaBottomMarginScale: 1.0 + property var mainMenuLinks: null property bool closedSource: false diff --git a/nymea-app/ui/RootItem.qml b/nymea-app/ui/RootItem.qml index ed301478..cdf03e3c 100644 --- a/nymea-app/ui/RootItem.qml +++ b/nymea-app/ui/RootItem.qml @@ -37,6 +37,13 @@ import "connection" Item { id: root + readonly property int safeAreaBottomMargin: { + if (Qt.platform.os !== "ios") { + return PlatformHelper.bottomPadding + } + return Math.round(PlatformHelper.bottomPadding * Math.max(0, Configuration.iosSafeAreaBottomMarginScale)) + } + function handleAndroidBackButton() { return swipeView.currentItem.handleAndroidBackButton() } @@ -80,7 +87,7 @@ Item { anchors.fill: parent anchors.topMargin: PlatformHelper.topPadding - anchors.bottomMargin: PlatformHelper.bottomPadding + anchors.bottomMargin: root.safeAreaBottomMargin anchors.leftMargin: PlatformHelper.leftPadding anchors.rightMargin: PlatformHelper.rightPadding