Merge pull request #4646 from phamdaniel/dark-mode

Add API to check OSX's Dark theme
This commit is contained in:
Cheng Zhao 2016-03-07 09:53:03 +09:00
commit 0e2ac2d802
8 changed files with 44 additions and 0 deletions

View file

@ -228,6 +228,10 @@ app.on('login', function(event, webContents, request, authInfo, callback) {
Emitted when the gpu process crashes.
### Event: 'platform-theme-changed' _OS X_
Emitted when the system's Dark Mode theme is toggled.
## Methods
The `app` object has the following methods:
@ -461,6 +465,10 @@ if (browserOptions.transparent) {
}
```
### `app.isDarkMode()` _OS X_
This method returns `true` if the system is in Dark Mode, and `false` otherwise.
### `app.commandLine.appendSwitch(switch[, value])`
Append a switch (with optional `value`) to Chromium's command line.