From 9a8c9b16fddd96ec2705f64d7023aedcde71d6e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Thu, 23 Mar 2023 09:52:23 +0800 Subject: Auth & Shop reuse custom TextField --- Authentication/SignIn.ui.qml | 21 +++------------------ Authentication/SignUp.ui.qml | 31 ++++--------------------------- 2 files changed, 7 insertions(+), 45 deletions(-) (limited to 'Authentication') diff --git a/Authentication/SignIn.ui.qml b/Authentication/SignIn.ui.qml index cb634a1..f36f61d 100644 --- a/Authentication/SignIn.ui.qml +++ b/Authentication/SignIn.ui.qml @@ -4,6 +4,7 @@ import QtQuick.Layouts 1.15 import Bootstrap 5.3 import Eduport 1.4 import "../Label" as Lbl +import "../TextField" as TxtFld import "../Button" as BsBtn Flickable { @@ -74,19 +75,11 @@ Flickable { Layout.margins: 16 } - TextField { + TxtFld.Input { id: email placeholderText: qsTr("E-mail") - font { - family: Bootstrap.bodyFont.family - weight: Bootstrap.bodyFont.weight - pointSize: Eduport.formControlFontSize - } Layout.fillWidth: true Layout.fillHeight: true - background: Rectangle { - color: "transparent" - } } } } @@ -114,20 +107,12 @@ Flickable { Layout.margins: 16 } - TextField { + TxtFld.Input { id: password placeholderText: qsTr("password") echoMode: TextInput.Password - font { - family: Bootstrap.bodyFont.family - weight: Bootstrap.bodyFont.weight - pointSize: Eduport.formControlFontSize - } Layout.fillWidth: true Layout.fillHeight: true - background: Rectangle { - color: "transparent" - } } } } diff --git a/Authentication/SignUp.ui.qml b/Authentication/SignUp.ui.qml index 8367fbf..683ee7b 100644 --- a/Authentication/SignUp.ui.qml +++ b/Authentication/SignUp.ui.qml @@ -4,6 +4,7 @@ import QtQuick.Layouts 1.15 import Bootstrap 5.3 import Eduport 1.4 import "../Label" as Lbl +import "../TextField" as TxtFld import "../Button" as BsBtn Flickable { @@ -77,19 +78,11 @@ Flickable { Layout.margins: 16 } - TextField { + TxtFld.Input { id: email placeholderText: qsTr("E-mail") - font { - family: Bootstrap.bodyFont.family - weight: Bootstrap.bodyFont.weight - pointSize: Eduport.formControlFontSize - } Layout.fillWidth: true Layout.fillHeight: true - background: Rectangle { - color: "transparent" - } } } } @@ -118,20 +111,12 @@ Flickable { Layout.margins: 16 } - TextField { + TxtFld.Input { id: password placeholderText: "*********" echoMode: TextInput.Password - font { - family: Bootstrap.bodyFont.family - weight: Bootstrap.bodyFont.weight - pointSize: Eduport.formControlFontSize - } Layout.fillWidth: true Layout.fillHeight: true - background: Rectangle { - color: "transparent" - } } } } @@ -160,20 +145,12 @@ Flickable { Layout.margins: 16 } - TextField { + TxtFld.Input { id: confirmPassword placeholderText: "*********" echoMode: TextInput.Password - font { - family: Bootstrap.bodyFont.family - weight: Bootstrap.bodyFont.weight - pointSize: Eduport.formControlFontSize - } Layout.fillWidth: true Layout.fillHeight: true - background: Rectangle { - color: "transparent" - } } } } -- cgit v1.2.3