mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 16:28:14 +00:00
Toggle hiding balance via Settings->Layout->Hide balance
This commit is contained in:
parent
03f09865e8
commit
db51dd0c39
2 changed files with 25 additions and 3 deletions
15
main.qml
15
main.qml
|
@ -355,8 +355,18 @@ ApplicationWindow {
|
||||||
function updateBalance() {
|
function updateBalance() {
|
||||||
if (!currentWallet)
|
if (!currentWallet)
|
||||||
return;
|
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){
|
function onWalletConnectionStatusChanged(status){
|
||||||
|
@ -1028,6 +1038,7 @@ ApplicationWindow {
|
||||||
property bool keyReuseMitigation2: true
|
property bool keyReuseMitigation2: true
|
||||||
property int segregationHeight: 0
|
property int segregationHeight: 0
|
||||||
property int kdfRounds: 1
|
property int kdfRounds: 1
|
||||||
|
property bool hideBalance: false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Information dialog
|
// Information dialog
|
||||||
|
|
|
@ -49,7 +49,7 @@ Rectangle {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: (isMobile)? 17 : 20
|
anchors.margins: (isMobile)? 17 : 20
|
||||||
anchors.topMargin: 0
|
anchors.topMargin: 0
|
||||||
spacing: 0
|
spacing: 6 * scaleRatio
|
||||||
|
|
||||||
MoneroComponents.CheckBox {
|
MoneroComponents.CheckBox {
|
||||||
visible: !isMobile
|
visible: !isMobile
|
||||||
|
@ -59,6 +59,17 @@ Rectangle {
|
||||||
text: qsTr("Custom decorations") + translationManager.emptyString
|
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 {
|
MoneroComponents.TextBlock {
|
||||||
visible: isMobile
|
visible: isMobile
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
|
|
Loading…
Reference in a new issue