feat: expose nativeTheme.shouldUseDarkColorsForSystemIntegratedUI
(#46599)
feat: expose shouldUseDarkColorsForSystemIntegratedUI Closes https://github.com/electron/electron/issues/46429. Refs https://github.com/electron/electron/pull/19735. This PR adds a new API `shouldUseDarkColorsForSystemIntegratedUI` to the `nativeTheme` module. This API returns a boolean indicating whether the system is using dark colors for system integrated UI elements. This is useful for applications that want to adapt their UI to match the system theme, especially for those that use system integrated UI elements like the shell theme or taskbar appearance. 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
1d2107ebff
commit
592d0155f1
4 changed files with 21 additions and 0 deletions
|
@ -48,6 +48,7 @@ class NativeTheme final : public gin::Wrappable<NativeTheme>,
|
|||
ui::NativeTheme::ThemeSource GetThemeSource() const;
|
||||
bool ShouldUseDarkColors();
|
||||
bool ShouldUseHighContrastColors();
|
||||
bool ShouldUseDarkColorsForSystemIntegratedUI();
|
||||
bool ShouldUseInvertedColorScheme();
|
||||
bool InForcedColorsMode();
|
||||
bool GetPrefersReducedTransparency();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue