diff options
author | Frederick Yin <fkfd@fkfd.me> | 2024-03-14 08:51:57 -0400 |
---|---|---|
committer | Frederick Yin <fkfd@fkfd.me> | 2024-03-14 08:51:57 -0400 |
commit | b78347b90c2b7760da419f93d98b9adfffa211dd (patch) | |
tree | 0472e0ac69c9b80c71fc90300b20704ee6ecb84e /contents/ui/main.qml | |
parent | fcfda88feb1c69188245a812290bf244b8e3919b (diff) |
Port to KF6
Diffstat (limited to 'contents/ui/main.qml')
-rw-r--r-- | contents/ui/main.qml | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/contents/ui/main.qml b/contents/ui/main.qml index 4e3be19..ee8bbdd 100644 --- a/contents/ui/main.qml +++ b/contents/ui/main.qml @@ -2,19 +2,18 @@ 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.networkmanagement 0.2 as PlasmaNM +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.plasma.networkmanagement as PlasmaNM +import org.kde.kirigami as Kirigami import "kanvas.js" as Kanvas -// TODO: change to PlasmoidItem on KF6 -Item { - width: PlasmaCore.Units.gridUnit * 20 - height: PlasmaCore.Units.gridUnit * 40 +PlasmoidItem { + width: Kirigami.Units.gridUnit * 20 + height: Kirigami.Units.gridUnit * 40 clip: true readonly property string canvasUrl: plasmoid.configuration.canvasUrl @@ -69,8 +68,8 @@ Item { } ScrollView { - implicitHeight: PlasmaCore.Units.gridUnit * 20 - Layout.margins: PlasmaCore.Units.smallSpacing + implicitHeight: Kirigami.Units.gridUnit * 20 + Layout.margins: Kirigami.Units.smallSpacing Layout.fillWidth: true Layout.fillHeight: true ScrollBar.horizontal.policy: ScrollBar.AlwaysOff @@ -84,7 +83,7 @@ Item { PlasmaExtras.PlaceholderMessage { anchors.centerIn: parent - width: parent.width - (PlasmaCore.Units.largeSpacing * 4) + width: parent.width - (Kirigami.Units.gridUnit * 4) visible: announcementsModel.count == 0 iconName: "mail-read-symbolic" text: i18n("No announcements") @@ -115,8 +114,8 @@ Item { } ScrollView { - implicitHeight: PlasmaCore.Units.gridUnit * 20 - Layout.margins: PlasmaCore.Units.smallSpacing + implicitHeight: Kirigami.Units.gridUnit * 20 + Layout.margins: Kirigami.Units.smallSpacing Layout.fillWidth: true Layout.fillHeight: true ScrollBar.horizontal.policy: ScrollBar.AlwaysOff @@ -124,13 +123,13 @@ Item { ListView { id: assignmentsListView Layout.fillWidth: true - spacing: PlasmaCore.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing delegate: ActivityView {} model: assignmentsModel PlasmaExtras.PlaceholderMessage { anchors.centerIn: parent - width: parent.width - (PlasmaCore.Units.largeSpacing * 4) + width: parent.width - (Kirigami.Units.gridUnit * 4) visible: assignmentsModel.count == 0 iconName: "mail-read-symbolic" text: i18n("No assignments") @@ -145,12 +144,12 @@ Item { onClicked: Kanvas.syncCanvas() } - PlasmaComponents3.Label { - id: offlineLabel - visible: networkStatus.networkStatus != "Connected" - text: i18n("Network disconnected") - color: PlasmaCore.Theme.negativeTextColor - } + // PlasmaComponents3.Label { + // id: offlineLabel + // visible: networkStatus.networkStatus != "Connected" + // text: i18n("Network disconnected") + // color: PlasmaCore.Theme.negativeTextColor + // } } } } |