MacOS Dark Mode Detection Code

(Posted 11 months ago) lavalamp

Has anyone got a way of detecting when Dark Mode is activated so that we can alter our MaxGUI views?

BTW IDE is broken under dark mode, the index side bar blocks out and text disappears, additionally the reveal arrows dissapear.

(Posted 10 months ago) lavalamp commented:

I found this XCODE example, could we have this in BltzMax? Sorry this is beyond me, only a basic programmer...

BOOL appearanceIsDark(NSAppearance * appearance)
    if (@available(macOS 10.14, *)) {
        NSAppearanceName basicAppearance = [appearance bestMatchFromAppearancesWithNames:@[
        return [basicAppearance isEqualToString:NSAppearanceNameDarkAqua];
    } else {
        return NO;
(Posted 10 months ago) RonTek commented:

This is possible with importing objective C code to blitzmax using .m files. Apparently I am on a PC and my OSX emulator is still crawling to get started on some Mac stuff. Looks simple enough though to give it a try, I will eventually check this out.

(Posted 3 months ago) lavalamp commented:

Any progress?

(Posted 3 months ago) RonTek commented:

Sorry lavalamp. I was supposed to do a complete upgrade earlier this year, but due to this c19 virus thing it got postponed. I am also considering to get some stuff online and trying to get this built before end of this year.

Reply To Topic (minimum 10 characters)

Please log in to reply