From 6366fd64c348778c31bddbbda9ca3e071d50e2ff 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: Wed, 22 Mar 2023 11:59:12 +0800 Subject: Auth uses custom labels --- Authentication/SignIn.ui.qml | 65 +++++++------------------------------------ Authentication/SignUp.ui.qml | 66 ++++++-------------------------------------- 2 files changed, 19 insertions(+), 112 deletions(-) (limited to 'Authentication') diff --git a/Authentication/SignIn.ui.qml b/Authentication/SignIn.ui.qml index 99b6b35..cb634a1 100644 --- a/Authentication/SignIn.ui.qml +++ b/Authentication/SignIn.ui.qml @@ -3,6 +3,7 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 import Bootstrap 5.3 import Eduport 1.4 +import "../Label" as Lbl import "../Button" as BsBtn Flickable { @@ -33,51 +34,28 @@ Flickable { ColumnLayout { id: columnLayout - Label { + Lbl.Hx { Layout.fillWidth: true text: titleHeader - wrapMode: Label.Wrap - font { - family: Eduport.hFont - .family - weight: Eduport.hFont - .weight - pointSize: 21.75 + font.pointSize: 21.75 + .013125 * columnLayout .width - } } - Label { + Lbl.Body { id: titleParagraph text: qsTr("Nice to see you! Please log in with your account.") - wrapMode: Label.Wrap color: "#6c757d" Layout.fillWidth: true - font { - family: Bootstrap - .bodyFont.family - weight: Bootstrap - .bodyFont.weight - pointSize: Eduport + font.pointSize: Eduport .leadFontSize - } } } ColumnLayout { - Label { + Lbl.Body { text: emailLabel - font { - family: Bootstrap - .bodyFont.family - weight: Bootstrap - .bodyFont.weight - pointSize: Bootstrap - .bodyFont - .pointSize - } } Rectangle { @@ -116,17 +94,8 @@ Flickable { ColumnLayout { - Label { + Lbl.Body { text: qsTr("Password *") - font { - family: Bootstrap - .bodyFont.family - weight: Bootstrap - .bodyFont.weight - pointSize: Bootstrap - .bodyFont - .pointSize - } } Rectangle { @@ -164,17 +133,11 @@ Flickable { } } - Label { + Lbl.Body { id: passwordHelper text: qsTr("Your password must be 8 characters at least") - font { - family: Bootstrap.bodyFont - .family - weight: Bootstrap.bodyFont - .weight - pointSize: Eduport + font.pointSize: Eduport .formTextFontSize - } color: "#6c757d" } RowLayout { @@ -229,16 +192,8 @@ Flickable { RowLayout { Layout.alignment: Qt.AlignHCenter - Label { + Lbl.Body { text: qsTr("Don't have an account?") - font { - family: Bootstrap.bodyFont - .family - weight: Bootstrap.bodyFont - .weight - pointSize: Bootstrap.bodyFont - .pointSize - } } Text { diff --git a/Authentication/SignUp.ui.qml b/Authentication/SignUp.ui.qml index 1ac51fa..8367fbf 100644 --- a/Authentication/SignUp.ui.qml +++ b/Authentication/SignUp.ui.qml @@ -3,6 +3,7 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 import Bootstrap 5.3 import Eduport 1.4 +import "../Label" as Lbl import "../Button" as BsBtn Flickable { @@ -34,52 +35,29 @@ Flickable { ColumnLayout { id: columnLayout - Label { + Lbl.Hx { Layout.fillWidth: true text: titleHeader - wrapMode: Label.Wrap - font { - family: Eduport.hFont - .family - weight: Eduport.hFont - .weight - pointSize: 21.75 + font.pointSize: 21.75 + .013125 * columnLayout .width - } } - Label { + Lbl.Body { id: titleParagraph color: "#6c757d" text: qsTr("Nice to see you! Please Sign up with your account.") - wrapMode: Label.Wrap Layout.fillWidth: true - font { - family: Bootstrap - .bodyFont.family - weight: Bootstrap - .bodyFont.weight - pointSize: Eduport + font.pointSize: Eduport .leadFontSize - } } } ColumnLayout { - Label { + Lbl.Body { text: emailLabel - font { - family: Bootstrap - .bodyFont.family - weight: Bootstrap - .bodyFont.weight - pointSize: Bootstrap - .bodyFont - .pointSize - } } Rectangle { @@ -119,17 +97,8 @@ Flickable { ColumnLayout { - Label { + Lbl.Body { text: qsTr("Password *") - font { - family: Bootstrap - .bodyFont.family - weight: Bootstrap - .bodyFont.weight - pointSize: Bootstrap - .bodyFont - .pointSize - } } Rectangle { @@ -170,17 +139,8 @@ Flickable { ColumnLayout { - Label { + Lbl.Body { text: qsTr("Confirm Password *") - font { - family: Bootstrap - .bodyFont.family - weight: Bootstrap - .bodyFont.weight - pointSize: Bootstrap - .bodyFont - .pointSize - } } Rectangle { @@ -256,16 +216,8 @@ Flickable { RowLayout { Layout.alignment: Qt.AlignHCenter - Label { + Lbl.Body { text: qsTr("Already have an account?") - font { - family: Bootstrap.bodyFont - .family - weight: Bootstrap.bodyFont - .weight - pointSize: Bootstrap.bodyFont - .pointSize - } } Text { -- cgit v1.2.3