iOS: Add option to shrink the bottomMargin on iOS

system-update-handler
Simon Stürz 2026-02-25 15:10:37 +01:00
parent cf010b4403
commit 7500e7533d
3 changed files with 12 additions and 1 deletions

View File

@ -32,6 +32,7 @@ ConfigurationBase {
company: "chargebyte GmbH"
connectionWizard: "/ui/connection/ConnectionWizard.qml"
iosSafeAreaBottomMarginScale: 1.0
magicEnabled: true
networkSettingsEnabled: true

View File

@ -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

View File

@ -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