feat: default gtk darkTheme option to nativeTheme.shouldUseDarkColors for better platform support (#20138)

* feat: default gtk darkTheme option to nativeTheme.shouldUseDarkColors for better platform support

* chore: update syntax for PR feedback

* refactor: only define SetGTKDarkThemeEnabled when needed

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
Samuel Attard 2020-03-29 23:02:16 -07:00 committed by GitHub
parent a3e28788ce
commit 6ecf729487
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 38 additions and 36 deletions

View file

@ -207,7 +207,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
* `opacity` Number (optional) - Set the initial opacity of the window, between 0.0 (fully
transparent) and 1.0 (fully opaque). This is only implemented on Windows and macOS.
* `darkTheme` Boolean (optional) - Forces using dark theme for the window, only works on
some GTK+3 desktop environments. Default is `false`.
some GTK+3 desktop environments. Default is [`nativeTheme.shouldUseDarkColors`](native-theme.md).
* `transparent` Boolean (optional) - Makes the window [transparent](frameless-window.md#transparent-window).
Default is `false`. On Windows, does not work unless the window is frameless.
* `type` String (optional) - The type of window, default is normal window. See more about