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
wxSplashScreen delayed transparency #23232
Comments
I'd really like to know what has changed here as I don't see why would it work differently than with 2.8. But independently of this I agree that it would make sense to set shape before showing the window. Adding a style just for this looks like an overkill, however. The usual idiom for creating a window initially hidden is auto w = new wxWindow(); // default ctor
w->Hide();
w->Create(parent, ...); and I'd prefer to make this work for BTW, I'd definitely recommend converting your BMP to PNG to avoid creating mask during run-time (and also have a much smaller size) in any case. |
I tried this and ran into another issue: i am running a non-dpi-aware application under a 'scaled' desktop (Windows 10 150% e.g.), and the transparent regions of the splash template have pixels from the backbuffer blended into them, but this 'screenshot' is scaled up before applying the blending, so it does not fit onto the original desktop any more (which would create the illusion af transparency) |
I am working on it, but still wip as you can see. |
Sorry, I don't understand how does using BMP vs PNG could change anything here. Also, with non-DPI-aware applications, the appearance must be the same at 100% and 150% (except blurry, of course), otherwise it would be a bug in Windows itself which seems unlikely. |
I was surprised too. This is how it looks when i use a png file with an alpha channel. The splash has a width of 1200x692px, the desktop is native 3200x1800 and the (Windows-) scaling is 200%. In the background is this issue thread visible, and scaled up in the splash. It looks a bit like
|
after upgrading to wx 3.2.1 i have an issue with the splash screen. The splash is shaped is created from a BMP with black (0/0/0) selected as transparent:
Actually everything works as expected, but under win10 with Intel GFX, for a short moment (ca. 1 second) the transparency is all black, then the transparent parts become transparent. this does not happen under linux or win/amd. Did not test other. With wx28 it worked as expected.
The bitmap is very complex, so creating the shape takes too long. An idea could be, to create the window, set the shape and then show it, but this is not possible since
Show(true)
is hardcoded into the wxSplashScreen ctor. Another idea could be, move the window outside the screen, set shape, then move to center, but this is not possible since pos and size are not forwarded to the wxSplashScreen/wxFrame ctor:
I solved the issue by copying the wxSplashScreen code and adding a "wxSPLASH_NO_AUTOSHOW" flag. Applied to the wx3.2.1 branch, a patch could be
The issue is discussed here:
https://forums.wxwidgets.org/viewtopic.php?f=23&t=50112
The text was updated successfully, but these errors were encountered: