feat: add transparency checking to nativeTheme
(#42862)
* feat: add transparency checking to nativeTheme
Refs 4684870
* chore: deprecate previous function
* chore: fix lint
This commit is contained in:
parent
9fc760bc4c
commit
5669a40d5c
8 changed files with 48 additions and 2 deletions
|
@ -67,6 +67,10 @@ bool NativeTheme::InForcedColorsMode() {
|
|||
return ui_theme_->InForcedColorsMode();
|
||||
}
|
||||
|
||||
bool NativeTheme::GetPrefersReducedTransparency() {
|
||||
return ui_theme_->GetPrefersReducedTransparency();
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
const CFStringRef WhiteOnBlack = CFSTR("whiteOnBlack");
|
||||
const CFStringRef UniversalAccessDomain = CFSTR("com.apple.universalaccess");
|
||||
|
@ -107,7 +111,9 @@ gin::ObjectTemplateBuilder NativeTheme::GetObjectTemplateBuilder(
|
|||
&NativeTheme::ShouldUseHighContrastColors)
|
||||
.SetProperty("shouldUseInvertedColorScheme",
|
||||
&NativeTheme::ShouldUseInvertedColorScheme)
|
||||
.SetProperty("inForcedColorsMode", &NativeTheme::InForcedColorsMode);
|
||||
.SetProperty("inForcedColorsMode", &NativeTheme::InForcedColorsMode)
|
||||
.SetProperty("prefersReducedTransparency",
|
||||
&NativeTheme::GetPrefersReducedTransparency);
|
||||
}
|
||||
|
||||
const char* NativeTheme::GetTypeName() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue