summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatasof Wirapraja <anata@darapsa.co.id>2020-12-07 10:38:36 +0700
committerAnatasof Wirapraja <anata@darapsa.co.id>2020-12-07 10:38:36 +0700
commitc35b90e20259b61672f7a35e089b46c07b038d67 (patch)
treef6684a5ca2fb83b5807672e94c4ecf2da936b21b
parentbf635def9dadee8a4aff8f90d8f419b02286cf9c (diff)
home form uses toolbar
-rw-r--r--main.qml2
-rw-r--r--pages/Home.qml13
-rw-r--r--pages/HomeForm.ui.qml50
-rw-r--r--qml.qrc3
-rw-r--r--qtquickcontrols2.conf2
5 files changed, 63 insertions, 7 deletions
diff --git a/main.qml b/main.qml
index 4ae99f0..37c80aa 100644
--- a/main.qml
+++ b/main.qml
@@ -15,7 +15,7 @@ ApplicationWindow {
OnboardingForm {
id: pageView
anchors.fill: parent
- startButton.onClicked: pageView.push("pages/GetStarted.qml")
+ startButton.onClicked: pageView.push("pages/Home.qml")
onboardingText1.text: qsTr("Everything you need to sell online.")
onboardingText2.text: qsTr("Set up your store in minutes and bring your brand to life")
disclaimerText.text: qsTr("By tapping 'Get started' and using this app, you're agreeing to our terms of service and privacy policy")
diff --git a/pages/Home.qml b/pages/Home.qml
new file mode 100644
index 0000000..868e55f
--- /dev/null
+++ b/pages/Home.qml
@@ -0,0 +1,13 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Layouts 1.12
+
+HomeForm {
+
+}
+
+/*##^##
+Designer {
+ D{i:0;autoSize:true;height:480;width:640}
+}
+##^##*/
diff --git a/pages/HomeForm.ui.qml b/pages/HomeForm.ui.qml
index 2df9430..02c502d 100644
--- a/pages/HomeForm.ui.qml
+++ b/pages/HomeForm.ui.qml
@@ -1,12 +1,54 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
+import QtQuick.Layouts 1.12
Page {
+ property alias menuButton: menuButton
+ property alias profileButton: profileButton
+ property alias contentView: contentView
- title: qsTr("Home")
+ header: ToolBar {
+ background: Rectangle {
+ color: "transparent"
+ }
+ RowLayout {
+ anchors.fill: parent
+ spacing: 0
+ ToolButton {
+ id: menuButton
+ icon.name: "menu-button"
+ icon.source: "../icons/menu-24px.svg"
+ highlighted: true
+ }
+ Label {
+ text: "Today"
+ Layout.leftMargin: 16
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignLeft
+ wrapMode: Text.WordWrap
+ font.family: "Work Sans"
+ font.weight: Font.Medium
+ font.pointSize: 20
+ color: "#000000"
+ Layout.fillWidth: true
+ }
+ ToolButton {
+ id: profileButton
+ icon.name: "profile-button"
+ icon.source: "../icons/profile-24px.svg"
+ highlighted: true
+ }
+ }
+ }
- Label {
- text: qsTr("You are on the home page.")
- anchors.centerIn: parent
+ StackView {
+ id: contentView
+ anchors.fill: parent
}
}
+/*##^##
+Designer {
+ D{i:0;autoSize:true;height:480;width:640}
+}
+##^##*/
+
diff --git a/qml.qrc b/qml.qrc
index 9581a80..a4617f1 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -8,7 +8,6 @@
<file>pages/GetStartedForm.ui.qml</file>
<file>pages/Onboarding.qml</file>
<file>pages/OnboardingForm.ui.qml</file>
- <file>pages/HomeForm.ui.qml</file>
<file>icons/add-24px.svg</file>
<file>icons/arrow-back-24px.svg</file>
<file>icons/arrow-forward-24px.svg</file>
@@ -25,5 +24,7 @@
<file>icons/photo_camera_24px.svg</file>
<file>icons/profile-24px.svg</file>
<file>icons/user-24px.svg</file>
+ <file>pages/Home.qml</file>
+ <file>pages/HomeForm.ui.qml</file>
</qresource>
</RCC>
diff --git a/qtquickcontrols2.conf b/qtquickcontrols2.conf
index 069c1db..3294845 100644
--- a/qtquickcontrols2.conf
+++ b/qtquickcontrols2.conf
@@ -2,6 +2,6 @@
Style=Material
[Material]
-Theme=Light
Accent=Cyan
Primary=BlueGrey
+Theme=Light