1
mirror of https://github.com/monero-project/monero-gui synced 2024-12-03 07:19:03 +01:00

Merge pull request #1553

ccb1f36 Changed regex to support amount lines starting with a period, but block the transaction creation wizard (skftn)
94e3d98 Increased left margin for the amount text (skftn)
This commit is contained in:
luigi1111 2018-09-12 17:29:01 -05:00
commit c46b5c82cd
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
2 changed files with 8 additions and 3 deletions

View File

@ -196,7 +196,7 @@ Item {
MoneroComponents.Input {
id: input
anchors.fill: parent
anchors.leftMargin: inlineIcon.visible ? 38 : 0
anchors.leftMargin: inlineIcon.visible ? 44 * scaleRatio : 0
font.pixelSize: item.fontSize
font.bold: item.fontBold
onEditingFinished: item.editingFinished()

View File

@ -162,7 +162,7 @@ Rectangle {
inlineButton.onClicked: amountLine.text = "(all)"
validator: RegExpValidator {
regExp: /(\d{1,8})([.]\d{1,12})?$/
regExp: /(.|)(\d{1,8})([.]\d{1,12})?$/
}
}
}
@ -337,7 +337,12 @@ Rectangle {
if(parseFloat(amountLine.text) > parseFloat(unlockedBalanceText)){
return false;
}
// The amount does not start with a period (example: `.4`)
if(amountLine.text.startsWith('.')){
return false;
}
return true;
}
onClicked: {