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: {