Browse Source

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

master
Sander van Grieken 3 years ago
parent
commit
0da1be33b7
  1. 2
      electrum/gui/qml/components/Wallets.qml
  2. 7
      electrum/gui/qml/components/main.qml

2
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()

7
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

Loading…
Cancel
Save