diff options
author | Frederick Yin <fkfd@fkfd.me> | 2022-04-07 10:05:21 +0800 |
---|---|---|
committer | Frederick Yin <fkfd@fkfd.me> | 2022-04-07 10:05:21 +0800 |
commit | 706572850b09257fc2d39f842dfb3850b8857da8 (patch) | |
tree | 98647bda8988466e1b8c58b240bde42c9329d2e4 /contents | |
parent | d0943f4838e54f0639dccebc199d3453b11cf816 (diff) |
Clicking announcement label toggles checkbox
Diffstat (limited to 'contents')
-rw-r--r-- | contents/ui/AnnouncementView.qml | 9 |
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 + } + } } } |