Move isAeroGlassEnabled and isDarkMode to systemPreferences
This commit is contained in:
parent
d72a0e452f
commit
ddd8eae661
8 changed files with 46 additions and 35 deletions
|
@ -4,11 +4,19 @@
|
|||
|
||||
#include "atom/browser/api/atom_api_system_preferences.h"
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
namespace atom {
|
||||
|
||||
namespace api {
|
||||
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
bool SystemPreferences::IsDarkMode() {
|
||||
NSString* mode = [[NSUserDefaults standardUserDefaults]
|
||||
stringForKey:@"AppleInterfaceStyle"];
|
||||
return [mode isEqualToString:@"Dark"];
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace api
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue