From 5f81b573c0f50ddde5d214125048b65e4218f7f7 Mon Sep 17 00:00:00 2001 From: selsta Date: Thu, 5 Sep 2019 01:31:41 +0200 Subject: [PATCH] TitleBar: show wallet name --- components/TitleBar.qml | 18 ++++++++++++++++++ main.qml | 2 ++ 2 files changed, 20 insertions(+) diff --git a/components/TitleBar.qml b/components/TitleBar.qml index 272a3b88..8dd25553 100644 --- a/components/TitleBar.qml +++ b/components/TitleBar.qml @@ -43,6 +43,7 @@ Rectangle { property bool showMinimizeButton: true property bool showMaximizeButton: true property bool showCloseButton: true + property string walletName: "" height: { if(!persistentSettings.customDecorations || isMobile) return 0; @@ -189,6 +190,7 @@ Rectangle { // monero logo Item { + visible: walletName.length === 0 Layout.fillWidth: true Layout.preferredHeight: parent.height @@ -216,6 +218,22 @@ Rectangle { } } + Item { + visible: walletName.length > 0 + Layout.fillWidth: true + Layout.preferredHeight: parent.height + + MoneroComponents.TextPlain { + font.pixelSize: 20 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + width: parent.width + height: parent.height + elide: Text.ElideRight + text: walletName + } + } + // minimize Rectangle { color: "transparent" diff --git a/main.qml b/main.qml index 92b0f033..2571c397 100644 --- a/main.qml +++ b/main.qml @@ -309,6 +309,7 @@ ApplicationWindow { middlePanel.getProofClicked.disconnect(handleGetProof); middlePanel.checkProofClicked.disconnect(handleCheckProof); + appWindow.walletName = ""; currentWallet = undefined; appWindow.showProcessingSplash(qsTr("Closing wallet...")); @@ -1925,6 +1926,7 @@ ApplicationWindow { TitleBar { id: titleBar visible: persistentSettings.customDecorations && middlePanel.state !== "Merchant" + walletName: appWindow.walletName anchors.left: parent.left anchors.right: parent.right onCloseClicked: appWindow.close();