🍎 Rename 'isDarkModeEnabled' to 'isDarkMode'

This commit is contained in:
Daniel Pham 2016-03-06 10:55:47 -05:00
parent 63294892f0
commit 68b453770b
4 changed files with 7 additions and 7 deletions

View file

@ -376,8 +376,8 @@ mate::ObjectTemplateBuilder App::GetObjectTemplateBuilder(
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
.SetMethod("hide", base::Bind(&Browser::Hide, browser)) .SetMethod("hide", base::Bind(&Browser::Hide, browser))
.SetMethod("show", base::Bind(&Browser::Show, browser)) .SetMethod("show", base::Bind(&Browser::Show, browser))
.SetMethod("isDarkModeEnabled", .SetMethod("isDarkMode",
base::Bind(&Browser::IsDarkModeEnabled, browser)) base::Bind(&Browser::IsDarkMode, browser))
#endif #endif
#if defined(OS_WIN) #if defined(OS_WIN)
.SetMethod("setUserTasks", .SetMethod("setUserTasks",

View file

@ -83,8 +83,8 @@ class Browser : public WindowListObserver {
// Show the application. // Show the application.
void Show(); void Show();
// Check if Dark Mode enabled. // Check if the system is in Dark Mode.
bool IsDarkModeEnabled(); bool IsDarkMode();
// Bounce the dock icon. // Bounce the dock icon.
enum BounceType { enum BounceType {

View file

@ -26,7 +26,7 @@ void Browser::Show() {
[[AtomApplication sharedApplication] unhide:nil]; [[AtomApplication sharedApplication] unhide:nil];
} }
bool Browser::IsDarkModeEnabled() { bool Browser::IsDarkMode() {
NSString *mode = [[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"]; NSString *mode = [[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"];
return [mode isEqualToString: @"Dark"]; return [mode isEqualToString: @"Dark"];
} }

View file

@ -465,9 +465,9 @@ if (browserOptions.transparent) {
} }
``` ```
### `app.isDarkModeEnabled()` _OS X_ ### `app.isDarkMode()` _OS X_
This method returns `true` if Dark Mode is enabled, and `false` otherwise. This method returns `true` if the system is in Dark Mode, and `false` otherwise.
### `app.commandLine.appendSwitch(switch[, value])` ### `app.commandLine.appendSwitch(switch[, value])`