mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-04 23:51:10 +02:00
Merge 9cde8c3df0
into 0a9d61986c
This commit is contained in:
commit
e57fabc9ea
@ -261,7 +261,9 @@ Rectangle {
|
||||
value: MoneroComponents.Style.orange
|
||||
}
|
||||
text: {
|
||||
if (persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle) {
|
||||
if (persistentSettings.hideBalance) {
|
||||
return qsTr("HIDDEN") + translationManager.emptyString
|
||||
} else if (persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle) {
|
||||
return balanceFiatString.split('.')[0] + "."
|
||||
} else {
|
||||
return balanceString.split('.')[0] + "."
|
||||
@ -270,7 +272,9 @@ Rectangle {
|
||||
font.pixelSize: {
|
||||
var defaultSize = 29;
|
||||
var digits = (balancePart1.text.length - 1)
|
||||
if (digits > 2 && !(persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle)) {
|
||||
if (persistentSettings.hideBalance) {
|
||||
return 26
|
||||
} else if (digits > 2 && !(persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle)) {
|
||||
return defaultSize - 1.1 * digits
|
||||
} else {
|
||||
return defaultSize
|
||||
@ -296,9 +300,13 @@ Rectangle {
|
||||
anchors.baseline: currencyLabel.baseline
|
||||
color: balancePart1.color
|
||||
text: {
|
||||
if (persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle) {
|
||||
if (persistentSettings.hideBalance) {
|
||||
balancePart2.visible = false;
|
||||
} else if (persistentSettings.fiatPriceEnabled && persistentSettings.fiatPriceToggle) {
|
||||
balancePart2.visible = true;
|
||||
return balanceFiatString.split('.')[1]
|
||||
} else {
|
||||
balancePart2.visible = true;
|
||||
return balanceString.split('.')[1]
|
||||
}
|
||||
}
|
||||
@ -312,6 +320,27 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: hideBalance
|
||||
themeTransition: false
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: persistentSettings.hideBalance ? 230 : 231
|
||||
anchors.baseline: currencyLabel.baseline
|
||||
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||
text: persistentSettings.hideBalance ? FontAwesome.eyeSlash : FontAwesome.eye
|
||||
font.pixelSize: 16
|
||||
MouseArea {
|
||||
id: hideBalanceMouseArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
persistentSettings.hideBalance = !persistentSettings.hideBalance
|
||||
appWindow.updateBalance();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item { //separator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
@ -75,6 +75,7 @@ Rectangle {
|
||||
MoneroComponents.CheckBox {
|
||||
id: hideBalanceCheckBox
|
||||
checked: persistentSettings.hideBalance
|
||||
toggleOnClick: false
|
||||
onClicked: {
|
||||
persistentSettings.hideBalance = !persistentSettings.hideBalance
|
||||
appWindow.updateBalance();
|
||||
|
Loading…
Reference in New Issue
Block a user