From b78347b90c2b7760da419f93d98b9adfffa211dd Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Thu, 14 Mar 2024 08:51:57 -0400 Subject: Port to KF6 --- contents/ui/ActivityView.qml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'contents/ui/ActivityView.qml') 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 { -- cgit v1.2.3