wxSplashScreen delayed transparency

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxSplashScreen delayed transparency

Post by ONEEYEMAN »

Hi,
Provide link as a reference, don't use it as a {whole} description.

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxSplashScreen delayed transparency

Post by doublemax »

heinermueller wrote: Mon Feb 06, 2023 3:35 pm Ok, i will do that. Maybe a good description and a link to this thread?
Don't write novels. This can be explained in a few short sentences and a small code sample.
Use the source, Luke!
heinermueller
Earned some good credits
Earned some good credits
Posts: 100
Joined: Sat Oct 26, 2013 11:54 am

Re: wxSplashScreen delayed transparency

Post by heinermueller »

a small fix could be

Code: Select all

$ git diff
diff --git a/include/wx/generic/splash.h b/include/wx/generic/splash.h
index 58a0add..a5466ae 100755
--- a/include/wx/generic/splash.h
+++ b/include/wx/generic/splash.h
@@ -25,6 +25,7 @@
 #define wxSPLASH_CENTRE_ON_SCREEN   0x02
 #define wxSPLASH_NO_CENTRE          0x00
 #define wxSPLASH_TIMEOUT            0x04
+#define wxSPLASH_NO_AUTOSHOW        0x08
 #define wxSPLASH_NO_TIMEOUT         0x00

 class WXDLLIMPEXP_FWD_CORE wxSplashScreenWindow;
diff --git a/src/generic/splash.cpp b/src/generic/splash.cpp
index 618c3a0..49c92fa 100755
--- a/src/generic/splash.cpp
+++ b/src/generic/splash.cpp
@@ -85,7 +85,7 @@ wxSplashScreen::wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int mil
         m_timer.Start(milliseconds, true);
     }

-    Show(true);
+    Show(!(m_splashStyle & wxSPLASH_NO_AUTOSHOW));
     m_window->SetFocus();
 #if defined( __WXMSW__ ) || defined(__WXMAC__)
     Update(); // Without this, you see a blank screen for an instant
This solves the problem for me with using (as suggested before)

Code: Select all

long splashstyle = wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_TIMEOUT | wxSPLASH_NO_AUTOSHOW;
splash = new mxwSplashScreen(
				bitmap, splashstyle, 
				8000, wxGetApp().getFrame(), ID_MXWSPLASH, wxDefaultPosition, wxDefaultSize, wxNO_BORDER | wxSTAY_ON_TOP | wxFRAME_SHAPED);

splash->SetShape(path);
splash->Show(true);
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxSplashScreen delayed transparency

Post by ONEEYEMAN »

Hi,
You should report it or make a PR on GitHub.
This is user forum made by users - core devs doesn't come here.

Thank you.
heinermueller
Earned some good credits
Earned some good credits
Posts: 100
Joined: Sat Oct 26, 2013 11:54 am

Re: wxSplashScreen delayed transparency

Post by heinermueller »

The issue is reported here:
https://github.com/wxWidgets/wxWidgets/issues/23232

Thanks for your support! :D
Post Reply