iOS: Add option to shrink the bottomMargin on iOS
This commit is contained in:
parent
cf010b4403
commit
7500e7533d
@ -32,6 +32,7 @@ ConfigurationBase {
|
|||||||
company: "chargebyte GmbH"
|
company: "chargebyte GmbH"
|
||||||
|
|
||||||
connectionWizard: "/ui/connection/ConnectionWizard.qml"
|
connectionWizard: "/ui/connection/ConnectionWizard.qml"
|
||||||
|
iosSafeAreaBottomMarginScale: 1.0
|
||||||
|
|
||||||
magicEnabled: true
|
magicEnabled: true
|
||||||
networkSettingsEnabled: true
|
networkSettingsEnabled: true
|
||||||
|
|||||||
@ -53,6 +53,9 @@ Item {
|
|||||||
|
|
||||||
property string alternativeMainPage: ""
|
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 var mainMenuLinks: null
|
||||||
property bool closedSource: false
|
property bool closedSource: false
|
||||||
|
|
||||||
|
|||||||
@ -37,6 +37,13 @@ import "connection"
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
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() {
|
function handleAndroidBackButton() {
|
||||||
return swipeView.currentItem.handleAndroidBackButton()
|
return swipeView.currentItem.handleAndroidBackButton()
|
||||||
}
|
}
|
||||||
@ -80,7 +87,7 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
anchors.topMargin: PlatformHelper.topPadding
|
anchors.topMargin: PlatformHelper.topPadding
|
||||||
anchors.bottomMargin: PlatformHelper.bottomPadding
|
anchors.bottomMargin: root.safeAreaBottomMargin
|
||||||
anchors.leftMargin: PlatformHelper.leftPadding
|
anchors.leftMargin: PlatformHelper.leftPadding
|
||||||
anchors.rightMargin: PlatformHelper.rightPadding
|
anchors.rightMargin: PlatformHelper.rightPadding
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user