1
0

qml: topbar label show wallet icon only when wallet name is displayed

This commit is contained in:
Sander van Grieken
2023-03-02 15:44:30 +01:00
parent 6383f83933
commit 0da1be33b7
2 changed files with 6 additions and 3 deletions

View File

@@ -13,6 +13,8 @@ Pane {
padding: 0
property string title: qsTr('Wallets')
function createWallet() {
var dialog = app.newWalletWizard.createObject(app)
dialog.open()

View File

@@ -119,7 +119,7 @@ ApplicationWindow
Image {
Layout.preferredWidth: constants.iconSizeSmall
Layout.preferredHeight: constants.iconSizeSmall
visible: Daemon.currentWallet && stack.currentItem.title == Daemon.currentWallet.name
visible: Daemon.currentWallet && (!stack.currentItem.title || stack.currentItem.title == Daemon.currentWallet.name)
source: '../../icons/wallet.png'
}
@@ -127,14 +127,15 @@ ApplicationWindow
Layout.fillWidth: true
Layout.preferredHeight: Math.max(implicitHeight, toolbarTopLayout.height)
text: stack.currentItem.title
? stack.currentItem.title
: Daemon.currentWallet.name
elide: Label.ElideRight
verticalAlignment: Qt.AlignVCenter
font.pixelSize: constants.fontSizeMedium
font.bold: true
MouseArea {
height: toolbarTopLayout.height
// height: toolbarTopLayout.height
anchors.fill: parent
// enabled: Daemon.currentWallet
onClicked: {
stack.getRoot().menu.open()
stack.getRoot().menu.y = toolbar.height