-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plasma 6 support #82
Comments
my ugly fix (not suggest to be applied diff --git a/package/contents/ui/FullRepresentation.qml b/package/contents/ui/FullRepresentation.qml
index 1cdbdb7..91cf22d 100644
--- a/package/contents/ui/FullRepresentation.qml
+++ b/package/contents/ui/FullRepresentation.qml
@@ -1,5 +1,5 @@
import QtQuick 2.0
-import QtQuick.Controls 1.1
+import QtQuick.Controls 2.15
import QtQuick.Layouts 1.1
import QtQuick.Window 2.2
diff --git a/package/contents/ui/NoteSection.qml b/package/contents/ui/NoteSection.qml
index f5fbc86..56586b7 100644
--- a/package/contents/ui/NoteSection.qml
+++ b/package/contents/ui/NoteSection.qml
@@ -1,14 +1,12 @@
import QtQuick 2.0
import QtQuick.Controls 2.5
-import QtQuick.Dialogs 1.2 // MessageDialog
+import QtQuick.Dialogs 6.3 // MessageDialog
import QtQuick.Layouts 1.1
-import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents3
-import org.kde.plasma.extras 2.0 as PlasmaExtras
-import QtQuick.Controls.Styles.Plasma 2.0 as PlasmaStyles
import org.kde.draganddrop 2.0 as DragAndDrop
+import org.kde.ksvg 1.0 as KSvg
ColumnLayout {
id: container
@@ -62,7 +60,7 @@ ColumnLayout {
delegate: labelRow
- PlasmaCore.FrameSvgItem {
+ KSvg.FrameSvgItem {
visible: labelMouseArea.containsMouse && !noteSectionDropArea.containsDrag
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
@@ -141,11 +139,9 @@ ColumnLayout {
MessageDialog {
// visible: true
title: i18n("Delete List")
- icon: StandardIcon.Warning
text: i18n("Are you sure you want to delete the list \"%1\" with %2 items?", noteSection.label || ' ', Math.max(0, noteSection.model.count - 1))
- standardButtons: StandardButton.Yes | StandardButton.Cancel
- onYes: noteItem.removeSection(index)
+ onAccepted: noteItem.removeSection(index)
Component.onCompleted: visible = true
}
}
@@ -154,7 +150,7 @@ ColumnLayout {
}
}
- PlasmaExtras.ScrollArea {
+ ScrollView {
Layout.fillWidth: true
Layout.fillHeight: true
diff --git a/package/contents/ui/TodoItemDelegate.qml b/package/contents/ui/TodoItemDelegate.qml
index 5d5d857..c1162a5 100644
--- a/package/contents/ui/TodoItemDelegate.qml
+++ b/package/contents/ui/TodoItemDelegate.qml
@@ -4,6 +4,9 @@ import QtQuick.Layouts 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.draganddrop 2.0 as DragAndDrop
+import org.kde.ksvg 1.0 as KSvg
+
+import org.kde.kirigami 2.20 as Kirigami
MouseArea {
id: todoItemDelegate
@@ -108,20 +111,20 @@ MouseArea {
delegate: todoItemRow
}
- PlasmaCore.FrameSvgItem {
+ KSvg.FrameSvgItem {
visible: todoItemDelegate.containsMouse && !dropArea.containsDrag
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.bottom: parent.bottom
width: parent.width / 2
- imagePath: plasmoid.file("", "images/dragarea.svg")
+ //imagePath: plasmoid.file("", "images/dragarea.svg")
}
}
PlasmaComponents3.CheckBox {
id: checkbox
Layout.alignment: Qt.AlignTop
- property int size: 30 * units.devicePixelRatio
+ property int size: 30
Layout.minimumWidth: size
Layout.minimumHeight: size
checked: todoItemDelegate.isCompleted
@@ -205,7 +208,7 @@ MouseArea {
return '<a href="' + m + '">' + m + '</a>' + ' ' // Extra space to prevent styling entire text as a link when ending with a link.
})
// Define before anchor tags.
- out = '<style>a { color: ' + theme.highlightColor + '; }</style>' + out
+ out = '<style>a { color: ' + Kirigami.Theme.highlightColor + '; }</style>' + out
// Render new lines
out = out.replace(/\n/g, '<br>')
diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml
index e08bb34..38902c7 100644
--- a/package/contents/ui/main.qml
+++ b/package/contents/ui/main.qml
@@ -2,8 +2,10 @@ import QtQuick 2.0
import QtQuick.Layouts 1.1
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
+import org.kde.plasma.plasma5support 2.0 as P5Support
+import org.kde.kirigami 2.20 as Kirigami
-Item {
+PlasmoidItem {
id: main
NoteItem {
@@ -12,7 +14,7 @@ Item {
Plasmoid.icon: plasmoid.configuration.icon
- Plasmoid.compactRepresentation: MouseArea {
+ compactRepresentation: MouseArea {
readonly property bool inPanel: (plasmoid.location == PlasmaCore.Types.TopEdge
|| plasmoid.location == PlasmaCore.Types.RightEdge
|| plasmoid.location == PlasmaCore.Types.BottomEdge
@@ -43,7 +45,7 @@ Item {
Layout.maximumWidth: inPanel ? units.iconSizeHints.panel : -1
Layout.maximumHeight: inPanel ? units.iconSizeHints.panel : -1
- PlasmaCore.IconItem {
+ Kirigami.Icon {
id: icon
anchors.fill: parent
source: plasmoid.icon
@@ -67,7 +69,7 @@ Item {
onClicked: plasmoid.expanded = !plasmoid.expanded
}
- Plasmoid.fullRepresentation: FullRepresentation {
+ fullRepresentation: FullRepresentation {
Plasmoid.backgroundHints: isDesktopContainment && !plasmoid.configuration.showBackground ? PlasmaCore.Types.NoBackground : PlasmaCore.Types.DefaultBackground
isDesktopContainment: plasmoid.location == PlasmaCore.Types.Floating
@@ -82,7 +84,7 @@ Item {
}
- PlasmaCore.DataSource {
+ P5Support.DataSource {
id: executable
engine: "executable"
connectedSources: [] |
@rhjdvsgsgks This patch together with |
@golinski > @rhjdvsgsgks This patch together with As a normy... I'm unsure how to do what you did. Is there a file I'm editing? I really miss my lists already! |
I think I did the same but I still get an unsupported widget error. Could you share the PKGBUILD file and any other steps you followed to achieve this. I'm on arch too with Plasma 6.0.1 |
I am also on arch with Plasma 6.0.1 and I am interested to understand what you actually did. Applying the patch, and installing the applet did not work for me. |
I've looked a bit more into it. And now I'm more convinced that the patch provided by @rhjdvsgsgks is insufficient. Also the
Sadly, even after these changes I don't get it working. I think strictly sticking to the official porting docs will be needed in order to get this work again. My OS:
|
please use
Kirigami.Icon
insteadhttps://invent.kde.org/plasma/plasma-workspace/-/issues/82
The text was updated successfully, but these errors were encountered: