From 86ed329c306bb53681e22cdd3afc8f180293377a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Sat, 21 Sep 2019 14:35:29 +0800 Subject: Put the task list view inside the page that was in day form --- Future.qml | 10 ---------- Home.qml | 8 +++++--- TaskList.qml | 15 ++++++++------- Today.qml | 10 ---------- forms/DayForm.ui.qml | 13 ------------- forms/TaskListForm.ui.qml | 34 +++++++++++++++++++++------------- kelakon.qrc | 3 --- larva | 2 +- 8 files changed, 35 insertions(+), 60 deletions(-) delete mode 100644 Future.qml delete mode 100644 Today.qml delete mode 100644 forms/DayForm.ui.qml 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 - } -} diff --git a/Home.qml b/Home.qml index e07fbf7..8754bc7 100644 --- a/Home.qml +++ b/Home.qml @@ -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 @@ pages/CreateProfileForm.ui.qml Home.qml forms/HomeForm.ui.qml - Today.qml - Future.qml - forms/DayForm.ui.qml forms/DayListForm.ui.qml TaskList.qml forms/TaskListForm.ui.qml diff --git a/larva b/larva index 42046ca..d5d916c 160000 --- a/larva +++ b/larva @@ -1 +1 @@ -Subproject commit 42046ca5e7879f8486a6bd4593ac7ea1d56e4d51 +Subproject commit d5d916ce5871a9786dfbeb5f016a6a8558c349cd -- cgit v1.2.3