Qt World Summit: Submit your Presentation

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?


  • Lifetime Qt Champion


    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