Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Changing black tray icon to white for Yosemite "dark mode"?



  • Yosemite dark mode makes dark tray icons almost invisible. Is there a way to use a monochrome icon or to detect dark mode to choose the appropriate icon file?

    Thanks!


  • Lifetime Qt Champion

    Hi,

    AFAIK, you'll have to use the NSAppearance class for that and write some native code to get the current appearance. Something like:

    @
    bool isDark() const
    {
    return [[[NSAppearance currentAppearance] name] containsString:NSAppearanceNameVibrantDark]);
    }
    @

    Beware: not tested


Log in to reply