Commit 249ee5c34d6bdf387c45047371444816b991b229

Authored by tfmoraes
1 parent ec87391b

FIX: Using AdvancedSplash instead of SplashScree. It doesn't stay white on load

Showing 1 changed file with 6 additions and 5 deletions   Show diff stats
invesalius/invesalius.py
@@ -34,6 +34,7 @@ if sys.platform != 'win32': @@ -34,6 +34,7 @@ if sys.platform != 'win32':
34 34
35 import wx 35 import wx
36 import wx.lib.pubsub as ps 36 import wx.lib.pubsub as ps
  37 +import wx.lib.agw.advancedsplash as AS
37 38
38 import gui.language_dialog as lang_dlg 39 import gui.language_dialog as lang_dlg
39 import i18n 40 import i18n
@@ -66,7 +67,7 @@ class InVesalius(wx.App): @@ -66,7 +67,7 @@ class InVesalius(wx.App):
66 67
67 # ------------------------------------------------------------------ 68 # ------------------------------------------------------------------
68 69
69 -class SplashScreen(wx.SplashScreen): 70 +class SplashScreen(AS.AdvancedSplash):
70 """ 71 """
71 Splash screen to be shown in InVesalius initialization. 72 Splash screen to be shown in InVesalius initialization.
72 """ 73 """
@@ -127,10 +128,10 @@ class SplashScreen(wx.SplashScreen): @@ -127,10 +128,10 @@ class SplashScreen(wx.SplashScreen):
127 bmp = wx.Image(path).ConvertToBitmap() 128 bmp = wx.Image(path).ConvertToBitmap()
128 129
129 style = wx.SPLASH_TIMEOUT | wx.SPLASH_CENTRE_ON_SCREEN 130 style = wx.SPLASH_TIMEOUT | wx.SPLASH_CENTRE_ON_SCREEN
130 - wx.SplashScreen.__init__(self, 131 + AS.AdvancedSplash.__init__(self,
131 bitmap=bmp, 132 bitmap=bmp,
132 - splashStyle=style,  
133 - milliseconds=1500, 133 + style=style,
  134 + timeout=5000,
134 id=-1, 135 id=-1,
135 parent=None) 136 parent=None)
136 self.Bind(wx.EVT_CLOSE, self.OnClose) 137 self.Bind(wx.EVT_CLOSE, self.OnClose)
@@ -144,7 +145,7 @@ class SplashScreen(wx.SplashScreen): @@ -144,7 +145,7 @@ class SplashScreen(wx.SplashScreen):
144 self.main = Frame(None) 145 self.main = Frame(None)
145 self.control = Controller(self.main) 146 self.control = Controller(self.main)
146 147
147 - self.fc = wx.FutureCall(1, self.ShowMain) 148 + self.fc = wx.FutureCall(2000, self.ShowMain)
148 149
149 def OnClose(self, evt): 150 def OnClose(self, evt):
150 # Make sure the default handler runs too so this window gets 151 # Make sure the default handler runs too so this window gets