Foundry376 / Mailspring

:love_letter: A beautiful, fast and fully open source mail client for Mac, Windows and Linux.
https://getmailspring.com/
GNU General Public License v3.0
15.42k stars 900 forks source link

feat: Add proper tray icons for Windows dark mode #2476

Closed Phylu closed 9 months ago

Phylu commented 10 months ago

Implement a tray icon to be used on Windows when dark mode is switched on.

This implementation is windows only, as on Mac the icon color is automatically inverted and Linux ships with the icons used for a dark tray only.

Solves: https://community.getmailspring.com/t/dark-gray-icon-on-windows-dark-mode/7337

foundry376-bot commented 10 months ago

This pull request has been mentioned on Mailspring Community. There might be relevant details there:

https://community.getmailspring.com/t/dark-gray-icon-on-windows-dark-mode/7337/3

3v1n0 commented 9 months ago

FYI, in linux you can also get this info using the color scheme portal setting.

However, you also need to consider that under GNOME the preference won't change the shell unless is set to a value that is not exposed by such interface (to force light/dark).

Phylu commented 9 months ago

Yes, the problem is that a lot of Linux desktop environments have a dark tray even when a light theme is activated. The system color should be available similar to Windows using the electron module. But I think that any change here would make the icon less visible in most cases. Therefore, I did not touch this for now.

@3v1n0 However I am open for ideas if you have any.

3v1n0 commented 9 months ago

Yes, the problem is that a lot of Linux desktop environments have a dark tray even when a light theme is activated. The system color should be available similar to Windows using the electron module. But I think that any change here would make the icon less visible in most cases. Therefore, I did not touch this for now.

True, sadly as said the system info is not provided to apps, even though it's available in gnome settings for example, but not something mailspring can check from a container.

In theory the way to do this properly would be to use symbolic icons, so that the DE can colorize them properly.

Now... the problem is that IIRC electron nowadays does not use libappindicator anymore so the icons will be pixbufs and these can't use this feature.