Have you tried using the Component.onCompleted
on the base PlasmoidItem
instead of the Plasmoid.fullRepresentation
(or compact)?
I haven’t tested this with your widget specifically and don’t have an Acer laptop to test with, but I’ve just tried with the Clipboard plasmoid (as a tray item) in a VM by copying a version to the home folder as an override and I added a console.log
output, which showed up in the journal, and on that basis I assume it should work.
Edit: I noticed you have a note about setting the color of the icon and I’ve worked with some plasmoid code around colors with the Pager plasmoid. Since you’re already doing a Kirigami import, have you tried using the Kirigami theme colors to apply the icon color automatically?
As a reference point, the Pager plasmoid uses Kirigami.Theme.textColor
, which on a panel set to Breeze Dark shows as white, and on a panel set to Breeze / Breeze Light shows as white.
That said, even if you did want to have it color automatically, you might still want to leave an option in to allow custom icon coloring if people might already want to do that.