From 3441620a2ef7f1de8ad3f1339b5063bf8789a9a0 Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Wed, 6 Apr 2022 21:31:13 +0800 Subject: Add AnnouncementView --- contents/ui/AnnouncementView.qml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 contents/ui/AnnouncementView.qml (limited to 'contents/ui/AnnouncementView.qml') diff --git a/contents/ui/AnnouncementView.qml b/contents/ui/AnnouncementView.qml new file mode 100644 index 0000000..8453b90 --- /dev/null +++ b/contents/ui/AnnouncementView.qml @@ -0,0 +1,41 @@ +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Controls 2.15 + +import org.kde.plasma.plasmoid 2.0 +import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents +import org.kde.plasma.components 3.0 as PlasmaComponents3 +import org.kde.plasma.extras 2.0 as PlasmaExtras + +RowLayout { + width: parent.width + Layout.fillWidth: true + + RowLayout { + Layout.fillWidth: true + PlasmaComponents3.CheckBox { + onToggled: () => { + announcementLabel.font.strikeout = (checkState == Qt.Checked) + } + } + + PlasmaComponents3.Label { + id: announcementLabel + text: `[${course}] ${title}` + elide: Text.ElideRight + Layout.fillWidth: true + } + } + + RowLayout { + Layout.alignment: Qt.AlignRight + PlasmaComponents3.ToolButton { + icon.name: "view-visible" + } + + PlasmaComponents3.ToolButton { + icon.name: "delete" + } + } +} -- cgit v1.2.3