feat: add transparency checking to nativeTheme
(#43024)
* feat: add transparency checking to nativeTheme
Refs 4684870
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
* chore: deprecate previous function
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
* chore: fix lint
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
---------
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
202536da2f
commit
f8c640d386
8 changed files with 48 additions and 2 deletions
|
@ -72,3 +72,7 @@ or is being instructed to use an inverted color scheme.
|
|||
|
||||
A `boolean` indicating whether Chromium is in forced colors mode, controlled by system accessibility settings.
|
||||
Currently, Windows high contrast is the only system setting that triggers forced colors mode.
|
||||
|
||||
### `nativeTheme.prefersReducedTransparency` _Readonly_
|
||||
|
||||
A `boolean` that indicates the whether the user has chosen via system accessibility settings to reduce transparency at the OS level.
|
||||
|
|
|
@ -401,10 +401,12 @@ Returns an object with system animation settings.
|
|||
|
||||
## Properties
|
||||
|
||||
### `systemPreferences.accessibilityDisplayShouldReduceTransparency()` _macOS_
|
||||
### `systemPreferences.accessibilityDisplayShouldReduceTransparency` _macOS_ _Deprecated_
|
||||
|
||||
A `boolean` property which determines whether the app avoids using semitransparent backgrounds. This maps to [NSWorkspace.accessibilityDisplayShouldReduceTransparency](https://developer.apple.com/documentation/appkit/nsworkspace/1533006-accessibilitydisplayshouldreduce)
|
||||
|
||||
**Deprecated:** Use the new [`nativeTheme.prefersReducedTransparency`](native-theme.md#nativethemeprefersreducedtransparency-readonly) API.
|
||||
|
||||
### `systemPreferences.effectiveAppearance` _macOS_ _Readonly_
|
||||
|
||||
A `string` property that can be `dark`, `light` or `unknown`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue