From 84e4a8257d13231b4a5b225364f2c8722fc4f11e Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 23 Nov 1999 19:30:12 +0000 Subject: [PATCH] Splashscreen works better on GTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/wxPython/lib/splashscreen.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/utils/wxPython/lib/splashscreen.py b/utils/wxPython/lib/splashscreen.py index a5fade26b9..fc8c04dc86 100644 --- a/utils/wxPython/lib/splashscreen.py +++ b/utils/wxPython/lib/splashscreen.py @@ -33,8 +33,10 @@ def bitmapFromFile(filename): #---------------------------------------------------------------------- class SplashScreen(wxFrame): - def __init__(self, parent, ID=-1, title="SplashScreen", style=wxSTAY_ON_TOP, - duration=1500, bitmapfile="bitmaps/splashscreen.bmp", callback = None): + def __init__(self, parent, ID=-1, title="SplashScreen", + style=wxSIMPLE_BORDER|wxSTAY_ON_TOP, + duration=1500, bitmapfile="bitmaps/splashscreen.bmp", + callback = None): ''' parent, ID, title, style -- see wxFrame duration -- milliseconds to display the splash screen @@ -73,6 +75,10 @@ class SplashScreen(wxFrame): self.timer.Start(duration, 1) # one-shot only EVT_LEFT_DOWN(self, self.OnMouseClick) + def OnPaint(self, event): + dc = wxPaintDC(self) + dc.DrawBitmap(self.bitmap, 0,0, false) + def OnSplashExitDefault(self, event=None): self.Close(true) -- 2.45.2