Page 1 of 1

Changing Browser background color while running.

PostPosted: Fri Sep 20, 2019 4:16 pm
by dsslater
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.

Re: Changing Browser background color while running.

PostPosted: Sat Sep 21, 2019 3:46 am
by magreenblatt
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.