From 0da1be33b72bf68496e5119567a096b183a15eb1 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Thu, 2 Mar 2023 15:44:30 +0100 Subject: [PATCH] qml: topbar label show wallet icon only when wallet name is displayed --- electrum/gui/qml/components/Wallets.qml | 2 ++ electrum/gui/qml/components/main.qml | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/electrum/gui/qml/components/Wallets.qml b/electrum/gui/qml/components/Wallets.qml index 9d18b3f61..5b6d3b76a 100644 --- a/electrum/gui/qml/components/Wallets.qml +++ b/electrum/gui/qml/components/Wallets.qml @@ -13,6 +13,8 @@ Pane { padding: 0 + property string title: qsTr('Wallets') + function createWallet() { var dialog = app.newWalletWizard.createObject(app) dialog.open() diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml index d40a98ac4..f17cdd375 100644 --- a/electrum/gui/qml/components/main.qml +++ b/electrum/gui/qml/components/main.qml @@ -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