mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 00:07:51 +00:00
Transfer: add XMR unit on transactions with a single recipient; move "send all" button next to Amount label
This commit is contained in:
parent
2946127ed7
commit
f06d6e067f
2 changed files with 43 additions and 16 deletions
|
@ -95,7 +95,10 @@ Item {
|
||||||
cursorShape: rect.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: rect.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: doClick()
|
onClicked: {
|
||||||
|
tooltip.text ? tooltip.tooltipPopup.close() : ""
|
||||||
|
doClick()
|
||||||
|
}
|
||||||
onEntered: {
|
onEntered: {
|
||||||
tooltip.text ? tooltip.tooltipPopup.open() : ""
|
tooltip.text ? tooltip.tooltipPopup.open() : ""
|
||||||
rect.color = buttonColor ? buttonColor : "#707070";
|
rect.color = buttonColor ? buttonColor : "#707070";
|
||||||
|
|
|
@ -318,12 +318,32 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
RowLayout {
|
||||||
Layout.preferredWidth: recipientLayout.secondRowWidth
|
id: amountLabel
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
spacing: 6
|
||||||
font.pixelSize: 16
|
Layout.preferredWidth: 125
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
Layout.maximumWidth: recipientLayout.secondRowWidth
|
||||||
text: qsTr("Amount") + translationManager.emptyString
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
|
font.pixelSize: 16
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
text: qsTr("Amount") + translationManager.emptyString
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.InlineButton {
|
||||||
|
fontFamily: FontAwesome.fontFamilySolid
|
||||||
|
fontStyleName: "Solid"
|
||||||
|
fontPixelSize: 16
|
||||||
|
text: FontAwesome.infinity
|
||||||
|
visible: recipientModel.count == 1
|
||||||
|
tooltip: qsTr("Send all unlocked balance of this account") + translationManager.emptyString
|
||||||
|
onClicked: recipientRepeater.itemAt(0).children[1].children[2].text = "(all)";
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -485,9 +505,10 @@ Rectangle {
|
||||||
font.styleName: "Solid"
|
font.styleName: "Solid"
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
opacity: mouseArea.containsMouse ? 1 : 0.85
|
opacity: mouseArea.containsMouse ? 1 : 0.85
|
||||||
text: recipientModel.count == 1 ? FontAwesome.infinity : FontAwesome.times
|
text: FontAwesome.times
|
||||||
tooltip: recipientModel.count == 1 ? qsTr("Send all unlocked balance of this account") : qsTr("Remove recipient") + translationManager.emptyString
|
tooltip: qsTr("Remove recipient") + translationManager.emptyString
|
||||||
tooltipLeft: true
|
tooltipLeft: true
|
||||||
|
visible: recipientModel.count > 1
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
|
@ -496,15 +517,18 @@ Rectangle {
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onEntered: parent.tooltipPopup.open()
|
onEntered: parent.tooltipPopup.open()
|
||||||
onExited: parent.tooltipPopup.close()
|
onExited: parent.tooltipPopup.close()
|
||||||
onClicked: {
|
onClicked: recipientModel.remove(index);
|
||||||
if (recipientModel.count == 1) {
|
|
||||||
parent.parent.children[2].text = "(all)";
|
|
||||||
} else {
|
|
||||||
recipientModel.remove(index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
Layout.leftMargin: recipientLayout.colSpacing / 2
|
||||||
|
Layout.preferredWidth: recipientLayout.thirdRowWidth
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
|
text: "XMR"
|
||||||
|
visible: recipientModel.count == 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue