From 5a1af88645a0889855dd121ad767f56317fa24f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Thu, 12 Sep 2019 20:30:57 +0800 Subject: Next button on e-mail input is disabled by default and enabled if there is text on the e-mail field --- pages/Email.qml | 7 +++++++ pages/EmailForm.ui.qml | 1 + 2 files changed, 8 insertions(+) (limited to 'pages') diff --git a/pages/Email.qml b/pages/Email.qml index e489753..22dc412 100644 --- a/pages/Email.qml +++ b/pages/Email.qml @@ -6,6 +6,13 @@ EmailForm { height: stackView.height backButton.onClicked: stackView.pop() + emailTextField.onTextChanged: { + if (!emailTextField.text) + loginButton.enabled = false + else if (!loginButton.enabled) + loginButton.enabled = true + } + loginButton.onClicked: { User.name = emailTextField.text stackView.push("qrc:/pages/Password.qml") diff --git a/pages/EmailForm.ui.qml b/pages/EmailForm.ui.qml index f05fe96..b0c0299 100644 --- a/pages/EmailForm.ui.qml +++ b/pages/EmailForm.ui.qml @@ -78,6 +78,7 @@ Rectangle { RoundButton { id: loginButton text: qsTr("Next") + enabled: false font.family: "Google Sans" font.capitalization: Font.MixedCase anchors.right: parent.right -- cgit v1.2.3