summaryrefslogtreecommitdiff
path: root/contents
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2022-04-07 10:05:21 +0800
committerFrederick Yin <fkfd@fkfd.me>2022-04-07 10:05:21 +0800
commit706572850b09257fc2d39f842dfb3850b8857da8 (patch)
tree98647bda8988466e1b8c58b240bde42c9329d2e4 /contents
parentd0943f4838e54f0639dccebc199d3453b11cf816 (diff)
Clicking announcement label toggles checkbox
Diffstat (limited to 'contents')
-rw-r--r--contents/ui/AnnouncementView.qml9
1 files changed, 9 insertions, 0 deletions
diff --git a/contents/ui/AnnouncementView.qml b/contents/ui/AnnouncementView.qml
index cba1d00..e178482 100644
--- a/contents/ui/AnnouncementView.qml
+++ b/contents/ui/AnnouncementView.qml
@@ -16,6 +16,7 @@ RowLayout {
RowLayout {
Layout.fillWidth: true
PlasmaComponents3.CheckBox {
+ id: announcementCheckbox
onToggled: () => {
announcementLabel.font.strikeout = (checkState == Qt.Checked)
}
@@ -26,6 +27,14 @@ RowLayout {
text: `[${course}] ${title}`
elide: Text.ElideRight
Layout.fillWidth: true
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: () => {
+ announcementCheckbox.toggle() // toggle checkbox
+ announcementCheckbox.toggled() // and trigger the onToggled effects
+ }
+ }
}
}