Skip to content
Snippets Groups Projects
Commit 5a3a7201 authored by Paul Chevalier's avatar Paul Chevalier
Browse files

ajout du logo dans le chargement a regarder dans le testchargement.py, il...

ajout du logo dans le chargement a regarder dans le testchargement.py, il devrait marcher, nutilise pas le multithreading
parent 09817ed3
No related branches found
No related tags found
No related merge requests found
Code_objets/LogoSymbole_canard.png

37 KiB

......@@ -13,7 +13,9 @@ customtkinter.set_appearance_mode("System") # Modes: "System" (standard), "Dark
customtkinter.set_default_color_theme("blue") # Themes: "blue" (standard), "green", "dark-blue"
class App(customtkinter.CTk):
def __init__(self):
super().__init__()
......@@ -230,8 +232,8 @@ if __name__ == "__main__":
# Fermer le splash et ouvrir le menu principal
time.sleep(4)
app = App()
splash.destroy()
splash.destroy()
app.mainloop()
\ No newline at end of file
File added
File added
File added
File added
File added
File added
File added
File added
import tkinter as tk
from PIL import Image, ImageTk # Installer Pillow si nécessaire : pip install pillow
import time
from tkinter import Tk, Label
from PIL import Image, ImageTk # Installer Pillow si nécessaire : pip install pillow
# Lancer ton programme principal ici
# Création de la fenêtre de splash screen
splash = tk.Tk()
splash = Tk()
splash.overrideredirect(True) # Enlever la barre de titre
# Charger l'image
......@@ -19,25 +20,32 @@ y_pos = (screen_height - img_height) // 2
splash.geometry(f"{img_width}x{img_height}+{x_pos}+{y_pos}")
# Afficher l'image
label = tk.Label(splash, image=photo)
label = Label(splash, image=photo)
label.pack()
# Garder le splash pendant le chargement
splash.update()
time.sleep(3) # Simuler le chargement
# Fermer le splash et ouvrir le menu principal
splash.destroy()
# Pour éviter que le programme ne se ferme instantanément
# Lancer ton programme principal ici
import os
import sys
# Fermer le splash et ouvrir le menu principal
base_dir = os.path.dirname(os.path.abspath(__file__))
dossier_path = os.path.join(base_dir,'Code_objets')
sys.path.append(dossier_path)
import Menu
temps = time.time()
a = Menu.App()
splash.destroy()
tmp = time.time()
a.mainloop()
tot = temps - tmp
print(f"Temps d'exécution : {-tot:.6f} secondes")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment