feat: honor nativeTheme.themeSource = 'dark'
before creating BrowserWindow on Windows (#25373)
* fix: support 'dark' theme before creating windows.
This commit is contained in:
parent
d3f32c7502
commit
f489e3054a
8 changed files with 241 additions and 0 deletions
|
@ -58,6 +58,10 @@ bool IsPictureInPictureEnabled() {
|
|||
return BUILDFLAG(ENABLE_PICTURE_IN_PICTURE);
|
||||
}
|
||||
|
||||
bool IsWinDarkModeWindowUiEnabled() {
|
||||
return BUILDFLAG(ENABLE_WIN_DARK_MODE_WINDOW_UI);
|
||||
}
|
||||
|
||||
bool IsComponentBuild() {
|
||||
#if defined(COMPONENT_BUILD)
|
||||
return true;
|
||||
|
@ -85,6 +89,7 @@ void Initialize(v8::Local<v8::Object> exports,
|
|||
dict.SetMethod("isPictureInPictureEnabled", &IsPictureInPictureEnabled);
|
||||
dict.SetMethod("isComponentBuild", &IsComponentBuild);
|
||||
dict.SetMethod("isExtensionsEnabled", &IsExtensionsEnabled);
|
||||
dict.SetMethod("isWinDarkModeWindowUiEnabled", &IsWinDarkModeWindowUiEnabled);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue