From 1c61de082af25075752bf4b8c4e2c8f3d836b780 Mon Sep 17 00:00:00 2001 From: xiphon Date: Sat, 10 Nov 2018 23:43:50 +0000 Subject: settings: fix Remote Node 'Connect' button --- components/LineEdit.qml | 1 + components/RemoteNodeEdit.qml | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'components') diff --git a/components/LineEdit.qml b/components/LineEdit.qml index 3a5c2769..9f4ad355 100644 --- a/components/LineEdit.qml +++ b/components/LineEdit.qml @@ -42,6 +42,7 @@ Item { property string placeholderColor: MoneroComponents.Style.defaultFontColor property real placeholderOpacity: 0.35 + property alias acceptableInput: input.acceptableInput property alias validator: input.validator property alias readOnly : input.readOnly property alias cursorPosition: input.cursorPosition diff --git a/components/RemoteNodeEdit.qml b/components/RemoteNodeEdit.qml index 314cb45d..52b3b46e 100644 --- a/components/RemoteNodeEdit.qml +++ b/components/RemoteNodeEdit.qml @@ -58,6 +58,11 @@ GridLayout { property bool lineEditFontBold: true signal editingFinished() + signal textChanged() + + function isValid() { + return daemonAddr.text.trim().length > 0 && daemonPort.acceptableInput + } function getAddress() { return daemonAddr.text.trim() + ":" + daemonPort.text.trim() @@ -79,6 +84,7 @@ GridLayout { fontBold: lineEditFontBold fontSize: lineEditFontSize onEditingFinished: root.editingFinished() + onTextChanged: root.textChanged() } LineEdit { @@ -99,5 +105,6 @@ GridLayout { validator: IntValidator{bottom: 1; top: 65535;} onEditingFinished: root.editingFinished() + onTextChanged: root.textChanged() } } -- cgit v1.2.3