diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-21 14:35:29 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-21 14:35:29 +0800 |
commit | 86ed329c306bb53681e22cdd3afc8f180293377a (patch) | |
tree | 6f5957bd8cbc778bf821f5bb93cfb9d66d5cb46c | |
parent | 5e7911117b621cbda0f12af69eb471e9732cf306 (diff) |
Put the task list view inside the page
that was in day form
-rw-r--r-- | Future.qml | 10 | ||||
-rw-r--r-- | Home.qml | 8 | ||||
-rw-r--r-- | TaskList.qml | 15 | ||||
-rw-r--r-- | Today.qml | 10 | ||||
-rw-r--r-- | forms/DayForm.ui.qml | 13 | ||||
-rw-r--r-- | forms/TaskListForm.ui.qml | 34 | ||||
-rw-r--r-- | kelakon.qrc | 3 | ||||
m--------- | larva | 0 |
8 files changed, 34 insertions, 59 deletions
diff --git a/Future.qml b/Future.qml deleted file mode 100644 index 33b66fd..0000000 --- a/Future.qml +++ /dev/null @@ -1,10 +0,0 @@ -import QtQuick 2.12 -import "forms" - -DayForm { - title: qsTr("Future task") - contentLabel.text: qsTr("You are back to the future.") - TaskList { - anchors.bottom: contentLabel.top - } -} @@ -27,7 +27,7 @@ HomeForm { todayItemDelegate { text: qsTr("Today") onClicked: { - contentView.push("Today.qml") + contentView.push("TaskList.qml") drawer.close() } } @@ -35,12 +35,14 @@ HomeForm { futureItemDelegate { text:qsTr("Future") onClicked: { - contentView.push("Future.qml") + contentView.push("TaskList.qml") drawer.close() } } } } - contentView.initialItem: Today {} + contentView.initialItem: TaskList { + title: qsTr("Today") + } } diff --git a/TaskList.qml b/TaskList.qml index 696f9ce..0e682df 100644 --- a/TaskList.qml +++ b/TaskList.qml @@ -3,12 +3,13 @@ import QtQuick.Controls 2.12 import "forms" TaskListForm { - objectName: "taskList" - model: taskList - delegate: TaskForm { - width: parent.width - height: task.height - checkBox.text: subject + listView { + objectName: "taskList" + model: taskList + delegate: TaskForm { + width: parent.width + height: task.height + checkBox.text: subject + } } - ScrollBar.vertical: ScrollBar {} } diff --git a/Today.qml b/Today.qml deleted file mode 100644 index 4b08fae..0000000 --- a/Today.qml +++ /dev/null @@ -1,10 +0,0 @@ -import QtQuick 2.12 -import "forms" - -DayForm { - title: qsTr("Today") - contentLabel.text: qsTr("Load `contentView` here") - TaskList { - anchors.bottom: contentLabel.top - } -} diff --git a/forms/DayForm.ui.qml b/forms/DayForm.ui.qml deleted file mode 100644 index 0478110..0000000 --- a/forms/DayForm.ui.qml +++ /dev/null @@ -1,13 +0,0 @@ -import QtQuick 2.12 -import QtQuick.Controls 2.12 - -Page { - id: page - property alias contentLabel: contentLabel - - Label { - id: contentLabel - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottom: parent.bottom - } -} diff --git a/forms/TaskListForm.ui.qml b/forms/TaskListForm.ui.qml index 87f1b1c..ebe976a 100644 --- a/forms/TaskListForm.ui.qml +++ b/forms/TaskListForm.ui.qml @@ -2,19 +2,27 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.Material 2.12 -ListView { - width: 362 - height: parent.height - anchors.topMargin: 8 - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 0 - spacing: 12 +Page { + id: page + property alias listView: listView - Rectangle { - id: rectangle - anchors.fill: parent - z: -1 + ListView { + id: listView + width: 362 + height: parent.height + anchors.topMargin: 8 + anchors.right: parent.right + anchors.rightMargin: 0 + anchors.left: parent.left + anchors.leftMargin: 0 + spacing: 12 + + Rectangle { + id: rectangle + anchors.fill: parent + z: -1 + } + + ScrollBar.vertical: ScrollBar {} } } diff --git a/kelakon.qrc b/kelakon.qrc index 1f10894..1fd21fa 100644 --- a/kelakon.qrc +++ b/kelakon.qrc @@ -20,9 +20,6 @@ <file>pages/CreateProfileForm.ui.qml</file> <file>Home.qml</file> <file>forms/HomeForm.ui.qml</file> - <file>Today.qml</file> - <file>Future.qml</file> - <file>forms/DayForm.ui.qml</file> <file>forms/DayListForm.ui.qml</file> <file>TaskList.qml</file> <file>forms/TaskListForm.ui.qml</file> diff --git a/larva b/larva -Subproject 42046ca5e7879f8486a6bd4593ac7ea1d56e4d5 +Subproject d5d916ce5871a9786dfbeb5f016a6a8558c349c |