Systray icon white on dark mode and macOS #68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On Windows (with Dark mode theme enabled) and macOS (which always have a dark tray), it's almost impossible to find Rabbit Remote Control icon on the systray because it matches the color of the systray. This PR is a proof of concept that I do believe you can develop it further and make it better to (1) always use white app systray icon on macOS in "rabbit-black" theme or (2) if the system is running in Dark mode (e.g. Windows) and "rabbit-black" is the default theme, uses a white app systray icon instead.
I tried to temporarily replace the theme by using
QIcon::setThemeName("rabbit-white")
, but it doesn't work, so I had to copy theapp.svg
file fromrabbit-white
over torabbit-black
and rename it to "app-invert", but maybe there's a better way to do this.Also, maybe it would be better to copy the function to detect dark-mode to RabbitCommon instead, but I don't know how to declare headers to add a function, and not sure if I can load a function from there on Rabbit Remote Control MainWindow, as I wasn't able to read the
QIcon::themeName
which should be set from there to detect ifrabbit-black
was in use, so I read the Rabbit Remote Control conf file directly.