splash screen fix
This commit is contained in:
parent
c05fde75c1
commit
20945c44aa
13
main.py
13
main.py
@ -21,26 +21,27 @@ def main() -> int:
|
||||
splash_image_path = paths.get_asset_path(settings_manager.get_config("splash_image"))
|
||||
use_splash = splash_image_path and paths.Path(splash_image_path).exists()
|
||||
|
||||
# Créer la fenêtre principale
|
||||
window: MainWindow = MainWindow()
|
||||
|
||||
if use_splash:
|
||||
# Créer et afficher le splash screen
|
||||
splash = SplashScreen(duration=1500)
|
||||
splash.show_splash()
|
||||
|
||||
# Connecter le signal finished pour afficher la fenêtre principale et vérifier les mises à jour
|
||||
# Connecter le signal finished pour créer et afficher la fenêtre principale
|
||||
def show_main_window():
|
||||
if update_manager.check_for_update():
|
||||
return 0
|
||||
app.quit()
|
||||
return
|
||||
window: MainWindow = MainWindow()
|
||||
window.show()
|
||||
|
||||
splash.finished.connect(lambda: show_main_window())
|
||||
splash.finished.connect(show_main_window)
|
||||
else:
|
||||
# Pas de splash screen, vérifier les mises à jour puis afficher la fenêtre principale
|
||||
if update_manager.check_for_update():
|
||||
return 0
|
||||
window: MainWindow = MainWindow()
|
||||
window.show()
|
||||
|
||||
return app.exec()
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
x
Reference in New Issue
Block a user