OS X asks apps to use a 19x19px monochomatic PDF as a tray icon in order to adapt a system default color based on the user's theme.
Use a template image to represent a menu bar extra. In General system preferences, users can change the menu bar (and Dock) to a dark appearance. [...]
Can that be done using QSystemTrayIcon?
As far as I can see the underlying QIcon class does not support PDF.
At the moment I am using a black SVG, which is displayed in pure black, causing a very unnatural appearance.
Default theme:
Dark theme:
Its known issue of QT which going to be fixed in version 5.6
This has been fixed in Qt 5.6. Just remember to set the isMask
attribute on the QIcon like this: myQIcon.setIsMask(true)
and then mySysTray.setIcon(myQIcon)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With