-
-
Notifications
You must be signed in to change notification settings - Fork 712
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
Transparent window has white background #748
Comments
The white background on startup was the first issue I had to deal with since my app loads in the "dark" theme by default. Try this option. My white canvas has disappeared ... completely ... //electron.net - start
builder.Services.AddElectron();
builder.WebHost.UseElectron(args);
if (HybridSupport.IsElectronActive)
{
// Open the Electron-Window here
Task.Run(async () => {
var window = await Electron.WindowManager.CreateWindowAsync(
new BrowserWindowOptions
{
Title = "Name app",
BackgroundColor = "#111",
Show = false,
AutoHideMenuBar = true,
});
window.Maximize();
window.OnClosed += () =>
{
Electron.App.Quit();
};
});
} |
I built a Blazor server app and it works without any problems. See the screenshot. For this I changed the
This is my Electron.NET startup code:
did you make it? |
@GregorBiswanger Yes! That's it. |
While we're at it, do you know if it is possible to allow mouse clicks/keystrokes to go through the transparent bits and on to a background app? Alternatively, if that's not possible, is it possible to make my window completely ignore any sort of interaction, and let the background app have everything? |
That is not (directly) possible (see electron/electron#1335). You can, however, use one of the workarounds in the linked issue to fake this behavior. |
Ok, there are a few good solution there indeed, thanks! |
I have created a window like so:
Expecting the background the be transparent, but instead it is white. (The page itself only contains one
<p>
element, nothing more)I tried adding some delay before calling
CreateWindowAsync
, as I saw it solved the issue for some people using normal Electron, but that did not help either.Any idea how can I fix this?
The text was updated successfully, but these errors were encountered: