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