From e8af71c340af5429ec57fe07d986a38914986b3e Mon Sep 17 00:00:00 2001 From: Anatasof Wirapraja Date: Fri, 20 Sep 2019 16:14:55 +0700 Subject: add `Profile` --- Home.qml | 20 ++++++++++---------- Profile.qml | 44 +++++++++++++++++++++++++++++--------------- assets/arrow-back-24px.svg | 1 + assets/close-24px.svg | 1 + main.qml | 4 ++++ pages/HomeForm.ui.qml | 2 +- 6 files changed, 46 insertions(+), 26 deletions(-) create mode 100644 assets/arrow-back-24px.svg create mode 100644 assets/close-24px.svg diff --git a/Home.qml b/Home.qml index af00c24..d5db6b1 100644 --- a/Home.qml +++ b/Home.qml @@ -14,16 +14,8 @@ Page { spacing: 0 ToolButton { id: menuButton - Layout.rightMargin: 0 - Layout.preferredHeight: -1 - Layout.preferredWidth: -1 - padding: 0 - rightPadding: 0 - leftPadding: 0 - bottomPadding: 0 - topPadding: 0 icon.name: "menu-button" - icon.source: "larva/components/icons/menu-24px.svg" + icon.source: "assets/menu-24px.svg" highlighted: true onClicked: { drawer.open() @@ -40,7 +32,15 @@ Page { font.pointSize: 20 color: "#000000" Layout.fillWidth: true - + } + ToolButton { + id: profileButton + icon.name: "profile-button" + icon.source: "assets/profile-24px.svg" + highlighted: true + onClicked: { + pageView.push("Profile.qml") + } } } } diff --git a/Profile.qml b/Profile.qml index 8e416bd..381f486 100644 --- a/Profile.qml +++ b/Profile.qml @@ -1,18 +1,32 @@ import QtQuick 2.12 -import KelakonUser 0.1 -import "pages" +import QtQuick.Controls 2.12 +import QtQuick.Controls.Material 2.12 +import QtQuick.Layouts 1.12 +import "larva/features" -CreateProfileForm { - backButton { - icon.source: "larva/components/icons/arrow-back-24px.svg" - onClicked: pageView.pop() - } - titleLabel.text: qsTr("Edit Profile") - skipButton.onClicked: { - pageView.push("Home.qml") - } - emailImage.source: "larva/components/icons/email-24px.svg" - enterFullName.text: User.realName - userNameLabel.text: User.name - emailAddressLabel.text: User.emailAddress +Page { + header: ToolBar{ + background: Rectangle { + color: "#FAFFFFFF" + } + RowLayout { + anchors.fill: parent + spacing: 0 + ToolButton { + id: backButton + icon.name: "back-button" + icon.source: "assets/arrow-back-24px.svg" + highlighted: true + onClicked: { + pageView.pop() + } + } + } + } } + +/*##^## +Designer { + D{i:0;autoSize:true;height:480;width:640} +} +##^##*/ diff --git a/assets/arrow-back-24px.svg b/assets/arrow-back-24px.svg new file mode 100644 index 0000000..9d5f05f --- /dev/null +++ b/assets/arrow-back-24px.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/close-24px.svg b/assets/close-24px.svg new file mode 100644 index 0000000..0fd6b0d --- /dev/null +++ b/assets/close-24px.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/main.qml b/main.qml index 233aa7a..05f372b 100644 --- a/main.qml +++ b/main.qml @@ -2,6 +2,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.Material 2.12 + ApplicationWindow { id: window visible: true @@ -17,6 +18,9 @@ ApplicationWindow { anchors.fill: parent initialItem: Onboarding { id: onboarding + logoImage.source: ("../kelakon-logo.png") + onboardingImage.source: ("../onboarding-1.png") + onboardingText1.text: qsTr("Get things done today, chill tomorrow.") } } } diff --git a/pages/HomeForm.ui.qml b/pages/HomeForm.ui.qml index 1f92d41..8119e9e 100644 --- a/pages/HomeForm.ui.qml +++ b/pages/HomeForm.ui.qml @@ -8,7 +8,7 @@ Page { title: qsTr("Today") Label { - text: qsTr("Load TaskList here") + text: qsTr("Load `contentView` here") anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter } -- cgit v1.2.3