summaryrefslogtreecommitdiff
path: root/contents/ui/ActivityView.qml
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2024-03-14 08:51:57 -0400
committerFrederick Yin <fkfd@fkfd.me>2024-03-14 08:51:57 -0400
commitb78347b90c2b7760da419f93d98b9adfffa211dd (patch)
tree0472e0ac69c9b80c71fc90300b20704ee6ecb84e /contents/ui/ActivityView.qml
parentfcfda88feb1c69188245a812290bf244b8e3919b (diff)
Port to KF6
Diffstat (limited to 'contents/ui/ActivityView.qml')
-rw-r--r--contents/ui/ActivityView.qml25
1 files changed, 12 insertions, 13 deletions
diff --git a/contents/ui/ActivityView.qml b/contents/ui/ActivityView.qml
index a1569aa..8ee1718 100644
--- a/contents/ui/ActivityView.qml
+++ b/contents/ui/ActivityView.qml
@@ -2,17 +2,16 @@ 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
+import org.kde.plasma.plasmoid
+import org.kde.plasma.core as PlasmaCore
+import org.kde.plasma.components as PlasmaComponents3
+import org.kde.plasma.extras as PlasmaExtras
+import org.kde.kirigami as Kirigami
import "activity.js" as Activity
// container for one single activity
-// TODO: port to PlasmaComponents3 before release of KF6
-PlasmaComponents.ListItem {
+PlasmaExtras.ListItem {
id: activityItem
separatorVisible: false
enabled: true // enable mouse event handling
@@ -22,7 +21,7 @@ PlasmaComponents.ListItem {
width:
(type == "announcement"
? announcementsListView : assignmentsListView).width
- - PlasmaCore.Units.gridUnit // HACK: clearance for scrollbar
+ - Kirigami.Units.gridUnit // HACK: clearance for scrollbar
Layout.fillWidth: true
RowLayout {
// "finished" checkbox and activity title
@@ -104,8 +103,8 @@ PlasmaComponents.ListItem {
important = !important
activityLabel.font.bold = important
activityLabel.color = important
- ? PlasmaCore.Theme.negativeTextColor
- : PlasmaCore.Theme.textColor
+ ? Kirigami.Theme.negativeTextColor
+ : Kirigami.Theme.textColor
const configKeys = {
announcement: "importantAnnouncements",
@@ -114,7 +113,7 @@ PlasmaComponents.ListItem {
let importantActivities = plasmoid.configuration[configKeys[type]]
const activityIdStr = activityId.toString()
-
+
if (important) {
if (!importantActivities.includes(activityIdStr)) {
importantActivities.push(activityIdStr)
@@ -133,11 +132,11 @@ PlasmaComponents.ListItem {
}
// announcement message
- PlasmaExtras.Paragraph {
+ PlasmaComponents3.Label {
Layout.fillWidth: true
visible: expanded
text: message
- horizontalAlignment: PlasmaExtras.Paragraph.AlignLeft
+ horizontalAlignment: Text.AlignLeft
}
PlasmaComponents3.Button {