summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2022-04-07 18:05:13 +0800
committerFrederick Yin <fkfd@fkfd.me>2022-04-07 18:05:13 +0800
commitfb5547888f3357df1f8ec1be330c87f8306e9086 (patch)
treebd1eb20ad40756382b9fdf4b2ec14a534a016219
parent7fd933dc512e4603a3a7cd0fdd581f08a6872528 (diff)
Add due date for assignments
-rw-r--r--contents/ui/ActivityView.qml27
1 files changed, 20 insertions, 7 deletions
diff --git a/contents/ui/ActivityView.qml b/contents/ui/ActivityView.qml
index 531a2c2..b6996ba 100644
--- a/contents/ui/ActivityView.qml
+++ b/contents/ui/ActivityView.qml
@@ -17,18 +17,30 @@ RowLayout {
Layout.fillWidth: true
PlasmaComponents3.CheckBox {
id: activityCheckbox
+ Layout.alignment: Qt.AlignTop
onToggled: () => {
activityLabel.font.strikeout = (checkState == Qt.Checked)
}
}
- PlasmaComponents3.Label {
- id: activityLabel
- text: `[${course}] ${title}`
- font.bold: important
- color: important ? PlasmaCore.Theme.negativeTextColor : PlasmaCore.Theme.textColor
- elide: Text.ElideRight
- Layout.fillWidth: true
+ ColumnLayout {
+ PlasmaComponents3.Label {
+ id: activityLabel
+ text: `[${course}] ${title}`
+ font.bold: important
+ color: important ? PlasmaCore.Theme.negativeTextColor : PlasmaCore.Theme.textColor
+ elide: Text.ElideRight
+ Layout.fillWidth: true
+
+ }
+
+ PlasmaComponents3.Label {
+ id: dueLabel
+ visible: type == "assignment"
+ text: "Due " + (due || "unknown")
+ color: activityLabel.color
+ Layout.fillWidth: true
+ }
MouseArea {
anchors.fill: parent
@@ -38,6 +50,7 @@ RowLayout {
}
}
}
+
}
RowLayout {