I developed a plasmoid based on mix of QtQuick, Plasma, Kirigami components in no particular order for they often duplicate or refer to each other or sometimes differ in styling.
Plasmoid colors follow system theme, but in Ubuntu the default is Twilight, i.e. it’s Light theme with Breeze Dark panel. Now my plasmoid looks broken for it still follows Light theme despite sitting on a dark panel.
More specifically, QtQuick Label seem to follow K.Theme (in compact mode). If I do:
this works for one color. How to apply the whole color theme? What are guidelines in this regard?
There is also PlasmaCore.Theme color set in addition to PlasmaCore.ColorScope. I hope they both have the same colors, do they? They do not have enough colors, though, for example they both lack K.Theme.positiveBackgroundColor which I need.
Kirigami.Theme.textColor follows the color scheme, while
PlasmaCore.Theme.textColor follows whatever plasma theme wants?
E.g. with plasma themes that follow the current color scheme
PlasmaCore.Theme will take the color from the plasma colors, otherwise it takes it from the plasma theme. Is that correct?
PlasmaCore.ColorScope is being deprecated and replaced by
Kirigami.Theme.colorSet for plasma 6 which (to my understanding) will solve these problems of getting the correct colors Mechanism to use own Kirigami::Theme in plasmoids (!801) · Merge requests · Plasma / KDE Plasma Framework · GitLab
For Plasma 5 the answer is: Never use Kirigami or QtQuick.Controls for Plasmoids, only use PlasmaCore/PlasmaComponents/PlasmaExtras components. Otherwise you get exactly the issues you are describing.
For Plasma 6 this changes slightly because some Kirigami components replace PlasmaCore components. But the general principle still stands: Don’t use QtQuick.Controls, use PlasmaComponents.
Note that QtQuick.Controls and PlasmaComponents offer the exact same API, their only difference is the styling