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:
@@ -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
|
||||
|
||||
@@ -155,8 +155,8 @@ Pane {
|
||||
icon.source: '../../icons/lightning.png'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
property color navigationBarBackgroundColor: constants.highlightBackground
|
||||
|
||||
Component {
|
||||
id: openChannelDialog
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -116,27 +116,31 @@ Pane {
|
||||
|
||||
}
|
||||
|
||||
FlatButton {
|
||||
ButtonContainer {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('Create Wallet')
|
||||
icon.source: '../../icons/add.png'
|
||||
onClicked: {
|
||||
if (Daemon.availableWallets.rowCount() > 0 && Config.walletShouldUseSinglePassword
|
||||
&& (!Daemon.singlePassword || Daemon.numWalletsWithPassword(Daemon.singlePassword) < 1)) {
|
||||
// if the user has wallets but hasn't unlocked any wallet yet force them to do so.
|
||||
// this ensures they know at least one wallets password and can complete the wizard
|
||||
// where they will need to enter the password of an existing wallet.
|
||||
var dialog = app.messageDialog.createObject(app, {
|
||||
title: qsTr('Wallet unlock required'),
|
||||
text: qsTr("You have to unlock any existing wallet first before creating a new wallet."),
|
||||
})
|
||||
dialog.open()
|
||||
} else {
|
||||
rootItem.createWallet()
|
||||
FlatButton {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('Create Wallet')
|
||||
icon.source: '../../icons/add.png'
|
||||
onClicked: {
|
||||
if (Daemon.availableWallets.rowCount() > 0 && Config.walletShouldUseSinglePassword
|
||||
&& (!Daemon.singlePassword || Daemon.numWalletsWithPassword(Daemon.singlePassword) < 1)) {
|
||||
// if the user has wallets but hasn't unlocked any wallet yet force them to do so.
|
||||
// this ensures they know at least one wallets password and can complete the wizard
|
||||
// where they will need to enter the password of an existing wallet.
|
||||
var dialog = app.messageDialog.createObject(app, {
|
||||
title: qsTr('Wallet unlock required'),
|
||||
text: qsTr("You have to unlock any existing wallet first before creating a new wallet."),
|
||||
})
|
||||
dialog.open()
|
||||
} else {
|
||||
rootItem.createWallet()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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() {
|
||||
|
||||
@@ -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 }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user