function isMacDarkMode: Boolean;
var sMode: string;
begin
//sMode := CFStringToStr( CFStringRef( NSUserDefaults.StandardUserDefaults.stringForKey( NSSTR('AppleInterfaceStyle') ))); // Doesn't work in auto mode
sMode := CFStringToStr( CFStringRef( NSApp.effectiveAppearance.name ));
Result := Pos('Dark', sMode) > 0;
end;
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.