aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-12-12 14:02:15 -0600
committerluigi1111 <luigi1111w@gmail.com>2018-12-12 14:02:15 -0600
commit68014ee4b22e4f8c35389692d0949124ef9bed60 (patch)
treefa586bb2188b47760d1af8b7e34222d4c7894092
parent2d9dc09be9556f789e1f6cada261bee6ed79cacb (diff)
parentdb51dd0c39ed2fa2de21426be4c8ae7d45a969d5 (diff)
downloadmonzero-gui-68014ee4b22e4f8c35389692d0949124ef9bed60.tar.gz
monzero-gui-68014ee4b22e4f8c35389692d0949124ef9bed60.tar.xz
monzero-gui-68014ee4b22e4f8c35389692d0949124ef9bed60.zip
Merge pull request #1802
db51dd0 Toggle hiding balance via Settings->Layout->Hide balance (xmrdsc)
-rw-r--r--main.qml15
-rw-r--r--pages/settings/SettingsLayout.qml13
2 files changed, 25 insertions, 3 deletions
diff --git a/main.qml b/main.qml
index 74a438fc..168473f9 100644
--- a/main.qml
+++ b/main.qml
@@ -355,8 +355,18 @@ ApplicationWindow {
function updateBalance() {
if (!currentWallet)
return;
- middlePanel.unlockedBalanceText = leftPanel.unlockedBalanceText = middlePanel.state === "Receive" ? qsTr("HIDDEN") : walletManager.displayAmount(currentWallet.unlockedBalance(currentWallet.currentSubaddressAccount));
- middlePanel.balanceText = leftPanel.balanceText = middlePanel.state === "Receive" ? qsTr("HIDDEN") : walletManager.displayAmount(currentWallet.balance(currentWallet.currentSubaddressAccount));
+
+ var balance_unlocked = qsTr("HIDDEN");
+ var balance = qsTr("HIDDEN");
+ if(!persistentSettings.hideBalance){
+ balance_unlocked = walletManager.displayAmount(currentWallet.unlockedBalance(currentWallet.currentSubaddressAccount));
+ balance = walletManager.displayAmount(currentWallet.balance(currentWallet.currentSubaddressAccount));
+ }
+
+ middlePanel.unlockedBalanceText = balance_unlocked;
+ leftPanel.unlockedBalanceText = balance_unlocked;
+ middlePanel.balanceText = balance;
+ leftPanel.balanceText = balance;
}
function onWalletConnectionStatusChanged(status){
@@ -1028,6 +1038,7 @@ ApplicationWindow {
property bool keyReuseMitigation2: true
property int segregationHeight: 0
property int kdfRounds: 1
+ property bool hideBalance: false
}
// Information dialog
diff --git a/pages/settings/SettingsLayout.qml b/pages/settings/SettingsLayout.qml
index 4bad9433..974da5e3 100644
--- a/pages/settings/SettingsLayout.qml
+++ b/pages/settings/SettingsLayout.qml
@@ -49,7 +49,7 @@ Rectangle {
anchors.right: parent.right
anchors.margins: (isMobile)? 17 : 20
anchors.topMargin: 0
- spacing: 0
+ spacing: 6 * scaleRatio
MoneroComponents.CheckBox {
visible: !isMobile
@@ -59,6 +59,17 @@ Rectangle {
text: qsTr("Custom decorations") + translationManager.emptyString
}
+ MoneroComponents.CheckBox {
+ visible: !isMobile
+ id: hideBalanceCheckBox
+ checked: persistentSettings.hideBalance
+ onClicked: {
+ persistentSettings.hideBalance = !persistentSettings.hideBalance
+ appWindow.updateBalance();
+ }
+ text: qsTr("Hide balance") + translationManager.emptyString
+ }
+
MoneroComponents.TextBlock {
visible: isMobile
font.pixelSize: 14