Move isAeroGlassEnabled and isDarkMode to systemPreferences

This commit is contained in:
Cheng Zhao 2016-04-25 12:35:09 +09:00
parent d72a0e452f
commit ddd8eae661
8 changed files with 46 additions and 35 deletions

View file

@ -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