You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: add new nativeTheme API
* chore: deprecate and clean up old systemPreferences theme APIs in favor of new nativeTheme module
* chore: clean up and deprecate things per feedback
* chore: add tests for deprecate and clean up invert impl
* build: when is a boolean not a boolean???
*`invertedColorScheme` Boolean - `true` if an inverted color scheme (a high contrast color scheme with light text and dark backgrounds) is being used, `false` otherwise.
Returns `Boolean` - Whether the system is in Dark Mode.
49
53
50
54
**Note:** On macOS 10.15 Catalina in order for this API to return the correct value when in the "automatic" dark mode setting you must either have `NSRequiresAquaSystemAppearance=false` in your `Info.plist` or be on Electron `>=7.0.0`. See the [dark mode guide](../tutorial/mojave-dark-mode-guide.md) for more information.
51
55
56
+
**Deprecated:** Should use the new [`nativeTheme.shouldUseDarkColors`](native-theme.md#nativethemeshouldusedarkcolors-readonly) API.
Returns `Boolean` - Whether the Swipe between pages setting is on.
@@ -342,14 +348,18 @@ Returns `String` - The standard system color formatted as `#RRGGBBAA`.
342
348
343
349
Returns one of several standard system colors that automatically adapt to vibrancy and changes in accessibility settings like 'Increase contrast' and 'Reduce transparency'. See [Apple Documentation](https://developer.apple.com/design/human-interface-guidelines/macos/visual-design/color#system-colors) for more details.
Returns `Boolean` - `true` if an inverted color scheme (a high contrast color scheme with light text and dark backgrounds) is active, `false` otherwise.
**Deprecated:** Should use the new [`nativeTheme.shouldUseInvertedColorScheme`](native-theme.md#nativethemeshoulduseinvertedcolorscheme-macos-windows-readonly) API.
Returns `Boolean` - `true` if a high contrast theme is active, `false` otherwise.
352
360
361
+
**Depreacted:** Should use the new [`nativeTheme.shouldUseHighContrastColors`](native-theme.md#nativethemeshouldusehighcontrastcolors-macos-windows-readonly) API.
Returns `String` - Can be `dark`, `light` or `unknown`.
@@ -365,7 +375,9 @@ using `electron-packager` or `electron-forge` just set the `enableDarwinDarkMode
365
375
packager option to `true`. See the [Electron Packager API](https://github.com/electron/electron-packager/blob/master/docs/api.md#darwindarkmodesupport)
*`appearance` String | null - Can be `dark` or `light`
381
393
@@ -450,10 +462,25 @@ Returns an object with system animation settings.
450
462
451
463
### `systemPreferences.appLevelAppearance`_macOS_
452
464
453
-
A `String` property that determines the macOS appearance setting for
465
+
A `String` property that can be `dark`, `light` or `unknown`. It determines the macOS appearance setting for
454
466
your application. This maps to values in: [NSApplication.appearance](https://developer.apple.com/documentation/appkit/nsapplication/2967170-appearance?language=objc). Setting this will override the
455
467
system default as well as the value of `getEffectiveAppearance`.
456
468
457
469
Possible values that can be set are `dark` and `light`, and possible return values are `dark`, `light`, and `unknown`.
458
470
459
471
This property is only available on macOS 10.14 Mojave or newer.
A `String` property that can be `dark`, `light` or `unknown`.
476
+
477
+
Returns the macOS appearance setting that is currently applied to your application,
478
+
maps to [NSApplication.effectiveAppearance](https://developer.apple.com/documentation/appkit/nsapplication/2967171-effectiveappearance?language=objc)
479
+
480
+
Please note that until Electron is built targeting the 10.14 SDK, your application's
481
+
`effectiveAppearance` will default to 'light' and won't inherit the OS preference. In
482
+
the interim in order for your application to inherit the OS preference you must set the
483
+
`NSRequiresAquaSystemAppearance` key in your apps `Info.plist` to `false`. If you are
484
+
using `electron-packager` or `electron-forge` just set the `enableDarwinDarkMode`
485
+
packager option to `true`. See the [Electron Packager API](https://github.com/electron/electron-packager/blob/master/docs/api.md#darwindarkmodesupport)
0 commit comments