KDE and Application Launcher natively support dark mode and a custom icon setting.
I recently wanted to apply a custom icon, but it only looked good on one of those themes. I have a light and dark version of said icon, but there was no way to auto-switch based on KDE theme.
Would it make sense to expand the Icon setting to split into two separate ones for light and dark mode?
I’m new to KDE and its source, but I was looking around to see how I’d implement this.
I now realize that each launcher variant has its own icon setting. Required changes will be in at least two places - plasma-desktop/applets/kickoff and plasma-desktop/applets/kicker - plus anything that’s needed to refresh the piece when the theme changes (if everything is not already refreshed).
The ideal way to do this is to make the icon itself respect the color scheme by using colors from the active theme, as @dirn replied above.
In case that’s not suitable, then the code would need to be changed to make this possible, yeah.
However keep in mind there’s no such thing as “dark mode” in Plasma, at last not really. In Plasma, there are only different color schemes; what people commonly call “dark mode” is just what you get when you apply a dark color scheme like Breeze Dark, or a global theme that uses a dark color scheme.
This is why in general we prefer the approach of respecting the active color scheme, rather than hardcoding any kind of “do this in dark mode” behavior.
I get that there are distinct themes, but there are multiple items in System Settings in current Plasma that treat dark mode as binary toggles. This even includes allowing two theme choices - one for light and another for dark mode (under “Colors & Themes”). Many included wallpapers have two variants - light and dark.
There’s even mention of dark mode in kicker config (see applets/kicker/ConfigGeneral.qml), albeit not in kickoff as far as I’ve seen.
But then I’m new to the KDE world and could be missing some context.