Implement a dark tray icon for light themes

The Problem

Hi, as you can see in the screenshot below, currently Mailspring displays a white tray icon even in light themes:

screenshot_20180521_154901

Using KDE Neon Developer Edition Unstable.

Proposed Solution

So I was wondering if it would be possible to make mailspring recognize the theme in use and display the correct tray icon (in this case, a dark one), though I think that snap confinement wouldn’t allow that. Maybe implementing a switch from which you can manually set the correct tray icon is more feasible, what do you think?

Thanks in advance.


(Originally posted by nihil21 on GitHub.)

Hey! Ahh this would be super cool - do you know how KDE normally exposes the theme tint color / light vs dark setting? I know we get a few environment variables through the Snap daemon, so we might be able to do this if it’s one of them.


(Originally posted by bengotow on GitHub.)

Unfortunately I don’t know how KDE does that


(Originally posted by nihil21 on GitHub.)

I second this request. Would be great to have dark icon for light themes.


(Originally posted by soee on GitHub.)

Hey! Ahh this would be super cool - do you know how KDE normally exposes the theme tint color / light vs dark setting? I know we get a few environment variables through the Snap daemon, so we might be able to do this if it’s one of them.

Plasma doesn’t distinguish between light and dark themes, there’s just colour schemes.
You can read ~/.config/kdeglobals to get the colour palette of the active colourscheme.


(Originally posted by pontaoski on GitHub.)

And if your icon is an SVG, you can even embed a stylesheet into it that allows it to conform to the active color scheme: https://cgit.kde.org/breeze-icons.git/tree/icons/status/16/battery-050.svg

For more information, see Guidelines and HOWTOs/Icon Workflow Tips - KDE Community Wiki


(Originally posted by Pointedstick on GitHub.)

This still hasn’t been fixed, I get a white icon on light background using KDE Plasma with Breeze theme. Perhaps a custom fix could be made when it detects “Breeze” (but not “Breeze Dark”) as the theme, as many users will be using it as its the default in Manjaro etc.


(Originally posted by taprobane99 on GitHub.)

Related:

Could you make a dark version of the tray icon for light desktop color schemes and put it on a switch in the preferences? It’s currently invisible with my light color scheme on Xfce.


(Originally posted by justindoran on GitHub.)

(Original post had 4 upvotes.)

Screenshot_20201128_175647

Notice the Mailspring icon, which is barely visible against the white background.

Can you add an option for light-colored panels such as mine? By selecting this option you would be able to toggle the icon color, which would go from white to black.


(Originally posted by DigiOhhh on GitHub.)