qml: don't add navigationbar padding when on-screen keyboard is visible,

also allow stackview pages to override navigationbar background color to
allow correct color runoff below buttons
This commit is contained in:
Sander van Grieken
2026-02-22 13:30:56 +01:00
parent 28f744f778
commit 738992ac9e
12 changed files with 41 additions and 20 deletions
@@ -276,6 +276,7 @@ Pane {
}
}
property color navigationBarBackgroundColor: constants.highlightBackground
Component {
id: sectionDelegate
@@ -466,8 +466,8 @@ Pane {
}
}
}
}
property color navigationBarBackgroundColor: constants.highlightBackground
ChannelDetails {
id: channeldetails
+1 -1
View File
@@ -155,8 +155,8 @@ Pane {
icon.source: '../../icons/lightning.png'
}
}
}
property color navigationBarBackgroundColor: constants.highlightBackground
Component {
id: openChannelDialog
+2
View File
@@ -112,4 +112,6 @@ Pane {
}
}
}
property color navigationBarBackgroundColor: constants.highlightBackground
}
@@ -314,6 +314,7 @@ Pane {
}
}
}
property color navigationBarBackgroundColor: constants.highlightBackground
Component {
id: serverConfig
@@ -107,4 +107,5 @@ Pane {
}
}
}
property color navigationBarBackgroundColor: constants.highlightBackground
}
@@ -480,6 +480,7 @@ Pane {
}
}
property color navigationBarBackgroundColor: constants.highlightBackground
TxDetails {
id: txdetails
@@ -518,6 +518,7 @@ Pane {
}
}
}
property color navigationBarBackgroundColor: constants.highlightBackground
Connections {
target: Daemon
@@ -325,6 +325,7 @@ Item {
}
}
}
property color navigationBarBackgroundColor: constants.highlightBackground
PIResolver {
id: piResolver
+4
View File
@@ -116,6 +116,8 @@ Pane {
}
ButtonContainer {
Layout.fillWidth: true
FlatButton {
Layout.fillWidth: true
text: qsTr('Create Wallet')
@@ -137,6 +139,8 @@ Pane {
}
}
}
}
property color navigationBarBackgroundColor: constants.highlightBackground
Connections {
target: Daemon
@@ -17,7 +17,7 @@ Dialog {
property bool _wasOpened: false
// Add bottom padding for Android navigation bar if needed
bottomPadding: needsSystemBarPadding ? app.navigationBarHeight : 0
bottomPadding: needsSystemBarPadding && app.keyboardFreeZone.state != 'visible' ? app.navigationBarHeight : 0
// called to finally close dialog after checks by onClosing handler in main.qml
function doClose() {
+10 -1
View File
@@ -36,6 +36,7 @@ ApplicationWindow
property alias stack: mainStackView
property alias keyboardFreeZone: _keyboardFreeZone
property alias infobanner: _infobanner
property color _navigationBarBackgroundColor: 'transparent'
property string pendingIntent: ""
@@ -287,13 +288,21 @@ ApplicationWindow
mainStackView.clear()
mainStackView.push(Qt.resolvedUrl(item_url))
}
function updateStylingFromItem(item) {
_navigationBarBackgroundColor = item && 'navigationBarBackgroundColor' in item
? item.navigationBarBackgroundColor
: 'transparent'
}
onCurrentItemChanged: updateStylingFromItem(currentItem)
}
// Add bottom padding for navigation bar on Android when UI is edge-to-edge
Item {
visible: app.navigationBarHeight > 0
visible: app.navigationBarHeight > 0 && _keyboardFreeZone.state != 'visible'
Layout.fillWidth: true
Layout.preferredHeight: app.navigationBarHeight
Rectangle { anchors.fill: parent; color: _navigationBarBackgroundColor }
}
}