Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Transparent splash screen
PsYhLo:
yes just like my
I was thinking this is because gtk-qt engine
It looks like some kind of bug to me :D
Sorry for my bad english
sethjackson:
It looks sorta like that in the about dialog on Windows....... :P
thomas:
--- Quote from: Der Meister on November 17, 2006, 06:27:14 pm ---Although I like the new design of the splash screen, is it really supposed to look like that? :D
--- End quote ---
What the hell, I replied to your post 10 minutes ago, where did it go???
Anyway: No, I had hoped it would look better after 3221 :?
The idea behind this screen (you get it) is to have a less fuzzy outline that can be region-skinned with simple CSG (4 rectangles, available on every platform). Unluckily, in reality, region skinning did nothing at all under Windows, so I emulated it with setting the DC's clip region.
As Yiannis later reported, this does not work for Linux, so I added region-skinning on top (both methods used now). Unluckily, I still have acute Linux shortage, so I can't test :(
--- Quote ---Testet on Linux with wxGTK 2.6.2, gcc 4.1.1 and revision, well, you probably can see that. :P
--- End quote ---
Lol, was about to ask "what version" :)
Could you give it a try please? If nothing helps, one could GetHandle() on the window and use GTK's native function to apply the region. However, it might be that SetBackgroundStyle() in line 121, which used to be the "GTK enabling hack" is the actual cause of this. Or, one might skip OnEraseBackground() entirely, maybe that grey is really some background drawing (which, for some reason draws outside the region?).
--- Quote from: sethjackson on November 17, 2006, 07:09:32 pm ---It looks sorta like that in the about dialog on Windows....... :P
--- End quote ---
Yes, but that's unrelated.
Der Meister:
--- Quote from: thomas on November 17, 2006, 07:38:59 pm ---Could you give it a try please? If nothing helps, one could GetHandle() on the window and use GTK's native function to apply the region. However, it might be that SetBackgroundStyle() in line 121, which used to be the "GTK enabling hack" is the actual cause of this. Or, one might skip OnEraseBackground() entirely, maybe that grey is really some background drawing (which, for some reason draws outside the region?).
--- End quote ---
I will have a look at it. Let's hope I find something usefull ;)
Der Meister:
Got it! :D
Here is the patch that works for me:
--- Code: ---Index: src/src/splashscreen.cpp
===================================================================
--- src/src/splashscreen.cpp (revision 3230)
+++ src/src/splashscreen.cpp (working copy)
@@ -22,7 +22,7 @@
static const wxString release(wxT(RELEASE));
static const wxString revision(wxT(SVN_REVISION));
- dc.SetClippingRegion(r);
+ dc.DestroyClippingRegion();
dc.DrawBitmap(m_label, 0, 0, false);
wxFont largeFont(16, wxSWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD);
--- End code ---
Anyway, I noticed that removing the code in OnEraseBackground does not change anything for me. It seems not necessary, at least on my system.
Another strange thing is that SetRegion always returns FALSE here, even with a simple rectangular region. Seems as wxGTK does not implement this function. (As the documentation says, it only works if the platform supports it.)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version