Window vibrant dark mode for macOS (possible JUCE enhancement)

I like my macOS apps to use NSAppearanceNameVibrantDark mode so I modified my local JUCE branch. For the most part in a JUCE app this yields a black title bar. Not sure if others do this enough to warrant merging it into the JUCE code.

juce_ComponentPeer.h @ line 75

        windowDarkMode              = (1 << 11),   /**< Dark Mode for macOS */

juce_mac_NSViewComponentPeer.cpp @ line 144

if (windowStyleFlags & windowDarkMode)
    window.appearance = [NSAppearance appearanceNamed:NSAppearanceNameVibrantDark];

The to implement override getDesktopWindowStyleFlags() in your app

int getDesktopWindowStyleFlags() const override
    return DocumentWindow::getDesktopWindowStyleFlags() | ComponentPeer::windowDarkMode;


+1, it’d be cool to use this with juce::Desktop::isOSXDarkModeActive()

Another +1

You should add this as a PR on Github

1 Like

Another +1 for having this in JUCE. I just created a little helper to do this:

Is there an equivalent on Windows? E.g. the Skype app has a dark title bar, so it must be possible, just not sure if its accessible via win32 APIs (I assume not…)