diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2018-09-12 17:29:01 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2018-09-12 17:29:01 -0500 |
| commit | c46b5c82cd4bb10756fd3fc47cba491614160099 (patch) | |
| tree | b8861c75cc74cebf83fbb5f06cd8b2afaff25dce | |
| parent | 77a2ebc2c418c7cfe40222e119e92a5fc0d1e7f3 (diff) | |
| parent | 94e3d984527514f8c140403ad7ded1cc2d069e0b (diff) | |
| download | monzero-gui-c46b5c82cd4bb10756fd3fc47cba491614160099.tar.gz monzero-gui-c46b5c82cd4bb10756fd3fc47cba491614160099.tar.xz monzero-gui-c46b5c82cd4bb10756fd3fc47cba491614160099.zip | |
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)
| -rw-r--r-- | components/LineEdit.qml | 2 | ||||
| -rw-r--r-- | pages/Transfer.qml | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/components/LineEdit.qml b/components/LineEdit.qml index 9eb50b04..3a5c2769 100644 --- a/components/LineEdit.qml +++ b/components/LineEdit.qml @@ -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() diff --git a/pages/Transfer.qml b/pages/Transfer.qml index c398eaf8..657a033c 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -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: { |
