aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-07-06 11:36:19 -0400
committerluigi1111 <luigi1111w@gmail.com>2021-07-06 11:36:19 -0400
commitd59595740528bd71abd7ee2f481ae5188034849c (patch)
treecfb333a1b62081a6113145c400b83bb169ee6d4f
parentb58bff39a04df3eefa016e283af6be73f58a9e18 (diff)
parent3907dac198dceac80e9fe9441279ad101e655bd3 (diff)
downloadmonzero-gui-d59595740528bd71abd7ee2f481ae5188034849c.tar.gz
monzero-gui-d59595740528bd71abd7ee2f481ae5188034849c.tar.xz
monzero-gui-d59595740528bd71abd7ee2f481ae5188034849c.zip
Merge pull request #3165
3907dac Account: remove 'Balance:' label; add XMR; align balances (rating89us)
-rw-r--r--main.qml4
-rw-r--r--pages/Account.qml30
2 files changed, 13 insertions, 21 deletions
diff --git a/main.qml b/main.qml
index 280a54f3..777ebebf 100644
--- a/main.qml
+++ b/main.qml
@@ -423,8 +423,8 @@ ApplicationWindow {
leftPanel.balanceString = balance
leftPanel.balanceUnlockedString = balanceU
if (middlePanel.state === "Account") {
- middlePanel.accountView.balanceAllText = walletManager.displayAmount(appWindow.currentWallet.balanceAll());
- middlePanel.accountView.unlockedBalanceAllText = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll());
+ middlePanel.accountView.balanceAllText = walletManager.displayAmount(appWindow.currentWallet.balanceAll()) + " XMR";
+ middlePanel.accountView.unlockedBalanceAllText = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll()) + " XMR";
}
}
diff --git a/pages/Account.qml b/pages/Account.qml
index 56e3dd50..29072d2d 100644
--- a/pages/Account.qml
+++ b/pages/Account.qml
@@ -103,6 +103,7 @@ Rectangle {
MoneroComponents.TextPlain {
id: balanceAll
+ Layout.rightMargin: 87
font.family: MoneroComponents.Style.fontMonoRegular.name;
font.pixelSize: 16
color: MoneroComponents.Style.defaultFontColor
@@ -115,7 +116,8 @@ Rectangle {
onExited: parent.color = MoneroComponents.Style.defaultFontColor
onClicked: {
console.log("Copied to clipboard");
- clipboard.setText(parent.text);
+ var balanceAllNumberOnly = parent.text.slice(0, -4);
+ clipboard.setText(balanceAllNumberOnly);
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
}
}
@@ -136,6 +138,7 @@ Rectangle {
MoneroComponents.TextPlain {
id: unlockedBalanceAll
+ Layout.rightMargin: 87
font.family: MoneroComponents.Style.fontMonoRegular.name;
font.pixelSize: 16
color: MoneroComponents.Style.defaultFontColor
@@ -148,7 +151,8 @@ Rectangle {
onExited: parent.color = MoneroComponents.Style.defaultFontColor
onClicked: {
console.log("Copied to clipboard");
- clipboard.setText(parent.text);
+ var unlockedBalanceAllNumberOnly = parent.text.slice(0, -4);
+ clipboard.setText(unlockedBalanceAllNumberOnly);
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
}
}
@@ -241,7 +245,7 @@ Rectangle {
id: addressLabel
color: MoneroComponents.Style.defaultFontColor
anchors.verticalCenter: parent.verticalCenter
- anchors.left: mainLayout.width >= 590 ? balanceTextLabel.left : balanceNumberLabel.left
+ anchors.left: balanceNumberLabel.left
anchors.leftMargin: -addressLabel.width - 30
fontSize: 16
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
@@ -250,18 +254,6 @@ Rectangle {
}
MoneroComponents.Label {
- id: balanceTextLabel
- visible: mainLayout.width >= 590
- color: MoneroComponents.Style.defaultFontColor
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: balanceNumberLabel.left
- anchors.leftMargin: -balanceTextLabel.width - 5
- fontSize: 16
- text: qsTr("Balance: ") + translationManager.emptyString
- themeTransition: false
- }
-
- MoneroComponents.Label {
id: balanceNumberLabel
color: MoneroComponents.Style.defaultFontColor
anchors.verticalCenter: parent.verticalCenter
@@ -269,9 +261,9 @@ Rectangle {
anchors.leftMargin: -balanceNumberLabel.width
fontSize: 16
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
- text: balance
+ text: balance + " XMR"
elide: Text.ElideRight
- textWidth: mainLayout.width < 660 ? 70 : 135
+ textWidth: 180
themeTransition: false
}
@@ -380,8 +372,8 @@ Rectangle {
subaddressAccountListView.model = appWindow.currentWallet.subaddressAccountModel;
appWindow.currentWallet.subaddress.refresh(appWindow.currentWallet.currentSubaddressAccount)
- balanceAll.text = walletManager.displayAmount(appWindow.currentWallet.balanceAll())
- unlockedBalanceAll.text = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll())
+ balanceAll.text = walletManager.displayAmount(appWindow.currentWallet.balanceAll()) + " XMR"
+ unlockedBalanceAll.text = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll()) + " XMR"
}
}