mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
Account: remove "Balance:" label; add XMR; align balances
This commit is contained in:
parent
cb1f3ad0ce
commit
3907dac198
2 changed files with 13 additions and 21 deletions
4
main.qml
4
main.qml
|
@ -437,8 +437,8 @@ ApplicationWindow {
|
||||||
leftPanel.balanceString = balance
|
leftPanel.balanceString = balance
|
||||||
leftPanel.balanceUnlockedString = balanceU
|
leftPanel.balanceUnlockedString = balanceU
|
||||||
if (middlePanel.state === "Account") {
|
if (middlePanel.state === "Account") {
|
||||||
middlePanel.accountView.balanceAllText = walletManager.displayAmount(appWindow.currentWallet.balanceAll());
|
middlePanel.accountView.balanceAllText = walletManager.displayAmount(appWindow.currentWallet.balanceAll()) + " XMR";
|
||||||
middlePanel.accountView.unlockedBalanceAllText = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll());
|
middlePanel.accountView.unlockedBalanceAllText = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll()) + " XMR";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,7 @@ Rectangle {
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: balanceAll
|
id: balanceAll
|
||||||
|
Layout.rightMargin: 87
|
||||||
font.family: MoneroComponents.Style.fontMonoRegular.name;
|
font.family: MoneroComponents.Style.fontMonoRegular.name;
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
@ -115,7 +116,8 @@ Rectangle {
|
||||||
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Copied to clipboard");
|
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)
|
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,6 +138,7 @@ Rectangle {
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: unlockedBalanceAll
|
id: unlockedBalanceAll
|
||||||
|
Layout.rightMargin: 87
|
||||||
font.family: MoneroComponents.Style.fontMonoRegular.name;
|
font.family: MoneroComponents.Style.fontMonoRegular.name;
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
@ -148,7 +151,8 @@ Rectangle {
|
||||||
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
onExited: parent.color = MoneroComponents.Style.defaultFontColor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Copied to clipboard");
|
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)
|
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -241,7 +245,7 @@ Rectangle {
|
||||||
id: addressLabel
|
id: addressLabel
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: mainLayout.width >= 590 ? balanceTextLabel.left : balanceNumberLabel.left
|
anchors.left: balanceNumberLabel.left
|
||||||
anchors.leftMargin: -addressLabel.width - 30
|
anchors.leftMargin: -addressLabel.width - 30
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
|
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
|
||||||
|
@ -249,18 +253,6 @@ Rectangle {
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
|
||||||
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 {
|
MoneroComponents.Label {
|
||||||
id: balanceNumberLabel
|
id: balanceNumberLabel
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
@ -269,9 +261,9 @@ Rectangle {
|
||||||
anchors.leftMargin: -balanceNumberLabel.width
|
anchors.leftMargin: -balanceNumberLabel.width
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
|
fontFamily: MoneroComponents.Style.fontMonoRegular.name;
|
||||||
text: balance
|
text: balance + " XMR"
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
textWidth: mainLayout.width < 660 ? 70 : 135
|
textWidth: 180
|
||||||
themeTransition: false
|
themeTransition: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,8 +367,8 @@ Rectangle {
|
||||||
subaddressAccountListView.model = appWindow.currentWallet.subaddressAccountModel;
|
subaddressAccountListView.model = appWindow.currentWallet.subaddressAccountModel;
|
||||||
appWindow.currentWallet.subaddress.refresh(appWindow.currentWallet.currentSubaddressAccount)
|
appWindow.currentWallet.subaddress.refresh(appWindow.currentWallet.currentSubaddressAccount)
|
||||||
|
|
||||||
balanceAll.text = walletManager.displayAmount(appWindow.currentWallet.balanceAll())
|
balanceAll.text = walletManager.displayAmount(appWindow.currentWallet.balanceAll()) + " XMR"
|
||||||
unlockedBalanceAll.text = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll())
|
unlockedBalanceAll.text = walletManager.displayAmount(appWindow.currentWallet.unlockedBalanceAll()) + " XMR"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue