New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BrowserWindow#setBackgroundColor()
method
#13464
Comments
This should just be a case of exposing the internal https://github.com/electron/electron/blob/master/atom/browser/api/atom_api_browser_window.cc#L295 |
Could I work on this? |
Hi I am new to this. Have C++ experience. Can anyone help me understand how I can contribute to this project and guide me towards solving this issue in specific. |
Looks like this is in 4.0.0-beta, but it only works (on macOS Mojave and Windows 10, at least) if the window is opened with a transparent backgroundColor. Otherwise setBackgroundColor() has no effect. |
Hey there, it seems like the
Also,
It also seems to be working without opening the window with a transparent See gist for Electron Fiddle: https://gist.github.com/erickzhao/f173c821a3310911d045ffeca201c10a Will be closing this for now, then! |
Is your feature request related to a problem? Please describe.
It's possible to set the
backgroundColor
in theBrowserWindow
constructor, but it's not possible to change it later. I need a way to dynamically change the background color when the user toggles system dark mode. I cannot just set it in CSS as my app useswindow.history.reload()
, so the original window background color becomes visible then.Describe the solution you'd like
I like to see a
BrowserWindow#setBackgroundColor()
method.The
BrowserView
API already have this method.The text was updated successfully, but these errors were encountered: