summaryrefslogtreecommitdiff
path: root/contents/ui/main.qml
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2022-04-06 21:31:13 +0800
committerFrederick Yin <fkfd@fkfd.me>2022-04-06 21:31:13 +0800
commit3441620a2ef7f1de8ad3f1339b5063bf8789a9a0 (patch)
tree4de1346d7aca18bcf3a40e092bfe451caffad61e /contents/ui/main.qml
parent23e689f43b56bc5e93d10bc395a28fbeca1a3c75 (diff)
Add AnnouncementView
Diffstat (limited to 'contents/ui/main.qml')
-rw-r--r--contents/ui/main.qml12
1 files changed, 6 insertions, 6 deletions
diff --git a/contents/ui/main.qml b/contents/ui/main.qml
index 8d4beb2..1d73bd4 100644
--- a/contents/ui/main.qml
+++ b/contents/ui/main.qml
@@ -11,6 +11,7 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras
Item {
width: PlasmaCore.Units.gridUnit * 20
height: PlasmaCore.Units.gridUnit * 40
+ clip: true
readonly property string canvasUrl: plasmoid.configuration.canvasUrl
readonly property string apiEndpoint: `${canvasUrl.replace(/\/$/, "")}/api/v1`
@@ -67,8 +68,6 @@ Item {
ColumnLayout {
id: main
anchors.fill: parent
- width: PlasmaCore.Units.gridUnit * 20
- height: PlasmaCore.Units.gridUnit * 40
PlasmaExtras.Heading {
level: 1
@@ -82,6 +81,10 @@ Item {
ListModel {
id: announcementsModel
+ ListElement {
+ course: "CS101"
+ title: "Title of the announcement"
+ }
}
ScrollView {
@@ -94,10 +97,7 @@ Item {
ListView {
Layout.fillWidth: true
- delegate: Text {
- text: `[${course}] ${title}`
- color: PlasmaCore.Theme.textColor
- }
+ delegate: AnnouncementView {}
model: announcementsModel
}
}