1
mirror of https://github.com/monero-project/monero-gui synced 2025-01-02 21:26:24 +01:00

transfer: prepend '0' to amount starting with '.'

This commit is contained in:
xiphon 2018-11-24 00:39:17 +00:00
parent 3e57bb344e
commit a79d76ff3f

View File

@ -144,6 +144,11 @@ Rectangle {
fontBold: true
inlineButtonText: qsTr("All") + translationManager.emptyString
inlineButton.onClicked: amountLine.text = "(all)"
onTextChanged: {
if (amountLine.text.startsWith('.')) {
amountLine.text = '0' + amountLine.text;
}
}
validator: RegExpValidator {
regExp: /(.|)(\d{1,8})([.]\d{1,12})?$/