heqro / colorschemeswapper-plasmoid

A KDE plasmoid to swap between any two given color schemes.
GNU General Public License v3.0
13 stars 2 forks source link

Port to KF6/Plasma6 #4

Closed ashwinvis closed 7 months ago

ashwinvis commented 8 months ago

First of all, thanks! It used to work in KDE Neon with Plasma 5 as expected for me.

The plasmoid needs to be ported for use in Plasma 6. I found this guide in the docs: https://develop.kde.org/docs/plasma/widget/porting_kf6/

heqro commented 8 months ago

Thank you for using the widget. I'm very busy with university matters this year. Do you know of any quick way to let the end user know that the widget does not support Plasma 6 (yet)?

ashwinvis commented 8 months ago

Plasma 6 detects itself that the widget is incompatible. No intervention necessary.

Adashi12 commented 7 months ago

I used this plasmoid a lot and am looking forward to use it again on Plasma 6!

ashwinvis commented 7 months ago

@heqro I can give it a try.

heqro commented 7 months ago

Actually, I'm about to push the update to Plasma 6 to this repo. I can ping you guys once it's done.

heqro commented 7 months ago

@Adashi12 @ashwinvis If you know how to install plasmoids from Github, could you check if this plasmoid is already working for you?

ashwinvis commented 7 months ago

@heqro I cloned and copied over the package directory to ~/.local/share/plasma/plasmoids. If I execute plasmoidviewer -a . inside the directory, it works in a test window, with some warnings

image

❯ plasmoidviewer -a .
QML debugging is enabled. Only use this in a safe environment.
qml: View QML loaded
kf.plasma.quick: Applet preload policy set to 1
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:196:25: QML FolderViewDropArea (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "minimumWidth"
Toolbox not loading, toolbox package is either invalid or disabled.
qml: New Containment: ContainmentItem_QML_45(0x63f0f48d8060, "desktop")
qt.qml.context: file:///home/avmo/.local/share/plasma/plasmoids/colorschemeswapper-plasmoid/package/contents/ui/main.qml:34:9 Parameter "sourceName" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.

However if I add it to a real panel, I get this

image

The icon is broken and does not work as it should.

heqro commented 7 months ago

May I ask you if, after installation, you restarted your system? I have personally found that, after logging in and out, it started working properly. As you may know, plasmoidviewer -a does "update" the widget inside the test window you show, but it actually does not update the widget for your system.

Consequently, I think that you may be running the older version of the widget.

Finally, provided it works on your end after solving this issue, I may ship this to the KDE Store and then try to work out the Warnings on free time/code contributions from people who may want to give a hand.

ashwinvis commented 7 months ago

I had removed the old plasmoid. I verified this by removing the development version and the plasmoid no longer appears in the "Add widgets" box. I have tried logging out and even restarting, the issue persisted.

Finally, I fixed the metadata (see the PR above) since it contained some Plasma 5 items.

heqro commented 7 months ago

Thank you for that! I have already merged the PR. If it works now on your end, I'll upload to KDE Store in the coming moments.