mac: Add support for force-[light|dark]-mode flags (see #3534)

This commit is contained in:
Marshall Greenblatt
2023-08-29 14:20:37 -04:00
parent 445da33efe
commit 2133d8f5b3
4 changed files with 108 additions and 56 deletions

View File

@@ -135,6 +135,9 @@ MainContextImpl::MainContextImpl(CefRefPtr<CefCommandLine> command_line,
// Parse the background color value.
background_color_ =
ParseColor(command_line_->GetSwitchValue(switches::kBackgroundColor));
} else if (command_line_->HasSwitch("force-dark-mode")) {
// Use black background color by default with dark mode.
background_color_ = ParseColor("black");
}
if (background_color_ == 0 && !use_views_) {