mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-09 19:32:03 +02: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:
commit
c46b5c82cd
@ -196,7 +196,7 @@ Item {
|
|||||||
MoneroComponents.Input {
|
MoneroComponents.Input {
|
||||||
id: input
|
id: input
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: inlineIcon.visible ? 38 : 0
|
anchors.leftMargin: inlineIcon.visible ? 44 * scaleRatio : 0
|
||||||
font.pixelSize: item.fontSize
|
font.pixelSize: item.fontSize
|
||||||
font.bold: item.fontBold
|
font.bold: item.fontBold
|
||||||
onEditingFinished: item.editingFinished()
|
onEditingFinished: item.editingFinished()
|
||||||
|
@ -162,7 +162,7 @@ Rectangle {
|
|||||||
inlineButton.onClicked: amountLine.text = "(all)"
|
inlineButton.onClicked: amountLine.text = "(all)"
|
||||||
|
|
||||||
validator: RegExpValidator {
|
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)){
|
if(parseFloat(amountLine.text) > parseFloat(unlockedBalanceText)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The amount does not start with a period (example: `.4`)
|
||||||
|
if(amountLine.text.startsWith('.')){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
Loading…
Reference in New Issue
Block a user