Commit 07b8c8d2f7a769f719247109ceba5b0c1fc6bc92
1 parent
99e50484
Exists in
master
and in
6 other branches
FIX: Splash under Windows
Showing
1 changed file
with
13 additions
and
4 deletions
Show diff stats
invesalius/invesalius.py
@@ -34,10 +34,10 @@ else: | @@ -34,10 +34,10 @@ else: | ||
34 | import wx | 34 | import wx |
35 | import wx.lib.pubsub as ps | 35 | import wx.lib.pubsub as ps |
36 | import wx.lib.agw.advancedsplash as agw | 36 | import wx.lib.agw.advancedsplash as agw |
37 | -if sys.platform == 'win32': | ||
38 | - _SplashScreen = wx.SpashScreen | ||
39 | -else: | 37 | +if sys.platform == 'linux2': |
40 | _SplashScreen = agw.AdvancedSplash | 38 | _SplashScreen = agw.AdvancedSplash |
39 | +else: | ||
40 | + _SplashScreen = wx.SplashScreen | ||
41 | 41 | ||
42 | import gui.language_dialog as lang_dlg | 42 | import gui.language_dialog as lang_dlg |
43 | import i18n | 43 | import i18n |
@@ -132,12 +132,21 @@ class SplashScreen(_SplashScreen): | @@ -132,12 +132,21 @@ class SplashScreen(_SplashScreen): | ||
132 | 132 | ||
133 | style = wx.SPLASH_TIMEOUT | wx.SPLASH_CENTRE_ON_SCREEN |\ | 133 | style = wx.SPLASH_TIMEOUT | wx.SPLASH_CENTRE_ON_SCREEN |\ |
134 | wx.FRAME_SHAPED | 134 | wx.FRAME_SHAPED |
135 | - _SplashScreen.__init__(self, | 135 | + if sys.platform == 'linux2': |
136 | + _SplashScreen.__init__(self, | ||
136 | bitmap=bmp, | 137 | bitmap=bmp, |
137 | style=style, | 138 | style=style, |
138 | timeout=5000, | 139 | timeout=5000, |
139 | id=-1, | 140 | id=-1, |
140 | parent=None) | 141 | parent=None) |
142 | + else: | ||
143 | + _SplashScreen.__init__(self, | ||
144 | + bitmap=bmp, | ||
145 | + splashStyle=style, | ||
146 | + milliseconds=5000, | ||
147 | + id=-1, | ||
148 | + parent=None) | ||
149 | + | ||
141 | 150 | ||
142 | self.Bind(wx.EVT_CLOSE, self.OnClose) | 151 | self.Bind(wx.EVT_CLOSE, self.OnClose) |
143 | 152 |