🍎 Rename 'isDarkModeEnabled' to 'isDarkMode'
This commit is contained in:
parent
63294892f0
commit
68b453770b
4 changed files with 7 additions and 7 deletions
|
@ -376,8 +376,8 @@ mate::ObjectTemplateBuilder App::GetObjectTemplateBuilder(
|
|||
#if defined(OS_MACOSX)
|
||||
.SetMethod("hide", base::Bind(&Browser::Hide, browser))
|
||||
.SetMethod("show", base::Bind(&Browser::Show, browser))
|
||||
.SetMethod("isDarkModeEnabled",
|
||||
base::Bind(&Browser::IsDarkModeEnabled, browser))
|
||||
.SetMethod("isDarkMode",
|
||||
base::Bind(&Browser::IsDarkMode, browser))
|
||||
#endif
|
||||
#if defined(OS_WIN)
|
||||
.SetMethod("setUserTasks",
|
||||
|
|
|
@ -83,8 +83,8 @@ class Browser : public WindowListObserver {
|
|||
// Show the application.
|
||||
void Show();
|
||||
|
||||
// Check if Dark Mode enabled.
|
||||
bool IsDarkModeEnabled();
|
||||
// Check if the system is in Dark Mode.
|
||||
bool IsDarkMode();
|
||||
|
||||
// Bounce the dock icon.
|
||||
enum BounceType {
|
||||
|
|
|
@ -26,7 +26,7 @@ void Browser::Show() {
|
|||
[[AtomApplication sharedApplication] unhide:nil];
|
||||
}
|
||||
|
||||
bool Browser::IsDarkModeEnabled() {
|
||||
bool Browser::IsDarkMode() {
|
||||
NSString *mode = [[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"];
|
||||
return [mode isEqualToString: @"Dark"];
|
||||
}
|
||||
|
|
|
@ -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])`
|
||||
|
||||
|
|
Loading…
Reference in a new issue