Changing Browser background color while running.

Think CEF could benefit from a new feature or capability? Discuss CEF feature requests here.

Changing Browser background color while running.

Postby dsslater » Fri Sep 20, 2019 4:16 pm

I am hoping to have the background_color setting exposed in the same fashion that windowless_frame_rate is exposed on CefBrowserHost. This is important for supporting dynamic OS themes (dark modes). A long lived browser needs to have its background_color changed in order to not flash another theme's color before a page loads.

Take the example of a long running browser being started in light mode on macOS, the browser background_color is set to white and the page that is loaded has a white background making for a seamless appearance while loading. If the user then changes the OS theme to dark mode, the application serves content that is correctly darkened, but because the same browser is being used, the window will flash white before the page loads.

Please let me know if there are any workarounds.
dsslater
Newbie
 
Posts: 1
Joined: Fri Sep 20, 2019 3:52 pm

Re: Changing Browser background color while running.

Postby magreenblatt » Sat Sep 21, 2019 3:46 am

Sounds reasonable. I’m not sure if this is supported by Chromium but you’re welcome to explore the code and submit a PR if so.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Feature Request Forum

Who is online

Users browsing this forum: No registered users and 30 guests