From 4df7fd771ac758afd496dd220b1207714ba6d5dd Mon Sep 17 00:00:00 2001 From: Anatasof Wirapraja Date: Wed, 18 Sep 2019 11:08:31 +0700 Subject: `loginButton` now push `Login.qml' --- features/Login.qml | 34 ++++++++++++++++++++++++++++++++++ features/LoginForm.ui.qml | 27 +++++++++++++++++++++++++++ features/Onboarding.qml | 1 + 3 files changed, 62 insertions(+) create mode 100644 features/Login.qml create mode 100644 features/LoginForm.ui.qml diff --git a/features/Login.qml b/features/Login.qml new file mode 100644 index 0000000..ea4bcd3 --- /dev/null +++ b/features/Login.qml @@ -0,0 +1,34 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import QtQuick.Controls.Material 2.12 +import QtQuick.Layouts 1.12 + +LoginForm { + ToolBar { + Material.elevation: 0 + background: Rectangle { + color: "#FAFFFFFF" + } + RowLayout { + ToolButton { + id: toolButton + icon.name: "back-button" + icon.source: "../components/icons/arrow-back-24px.svg" + highlighted: true + onClicked: { + if (stackView.depth > 1) { + stackView.pop() + } else { + drawer.open() + } + } + } + } + } +} + +/*##^## +Designer { + D{i:0;autoSize:true;height:480;width:640} +} +##^##*/ diff --git a/features/LoginForm.ui.qml b/features/LoginForm.ui.qml new file mode 100644 index 0000000..29f4902 --- /dev/null +++ b/features/LoginForm.ui.qml @@ -0,0 +1,27 @@ +import QtQuick 2.12 +import QtQuick.Layouts 1.12 +import QtQuick.Controls 2.12 +import QtQuick.Controls.Material 2.12 + +Page { + id: page + title: qsTr("Login") + + Text { + id: pageTitle + text: stackView.currentItem.title + anchors.bottom: parent.bottom + anchors.bottomMargin: 16 + anchors.left: parent.left + anchors.leftMargin: 16 + font.pixelSize: 20 + font.family: "Work Sans" + font.weight: Font.Medium + } +} +/*##^## +Designer { + D{i:0;autoSize:true;height:480;width:640} +} +##^##*/ + diff --git a/features/Onboarding.qml b/features/Onboarding.qml index eaa0052..bfda1e5 100644 --- a/features/Onboarding.qml +++ b/features/Onboarding.qml @@ -2,4 +2,5 @@ import QtQuick 2.4 OnboardingForm { objectName: "onboarding" + loginButton.onClicked: stackView.push("Login.qml") } -- cgit v1.2.3