2016-04-24 12:13:46 +00:00
|
|
|
// Copyright (c) 2016 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#include "atom/browser/api/atom_api_system_preferences.h"
|
|
|
|
|
2016-04-25 03:35:09 +00:00
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
2016-04-24 12:13:46 +00:00
|
|
|
namespace atom {
|
|
|
|
|
|
|
|
namespace api {
|
|
|
|
|
2016-04-25 03:35:09 +00:00
|
|
|
#if defined(OS_MACOSX)
|
|
|
|
bool SystemPreferences::IsDarkMode() {
|
|
|
|
NSString* mode = [[NSUserDefaults standardUserDefaults]
|
|
|
|
stringForKey:@"AppleInterfaceStyle"];
|
|
|
|
return [mode isEqualToString:@"Dark"];
|
|
|
|
}
|
|
|
|
#endif
|
2016-04-24 12:13:46 +00:00
|
|
|
|
|
|
|
} // namespace api
|
|
|
|
|
|
|
|
} // namespace atom
|