Skip to content

Commit

Permalink
Fixed a small coloring bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ziadOUA committed Jan 27, 2024
1 parent 975fa1c commit 2b1befa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions blocus.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ def reset_variables(self): # Toutes les variables sont réinitialisées

def main_menu(self):
global how_to_play_label, main_menu_frame
global small_label_style, medium_label_style, large_label_style, xlarge_label_style

for i in self.master.winfo_children():
i.destroy() # On supprime tout le contenu de la fenêtre
Expand All @@ -454,6 +455,11 @@ def main_menu(self):
style.configure('TButton', background=button_background_color, focuscolor=button_background_color, relief='flat') # On s'assure que les boutons ont bien les bonnes couleurs
style.map('TButton', background=[('active', button_background_color), ('disabled', button_background_color)], relief=[('pressed', 'flat')])

small_label_style = {'background': background_color, 'foreground': invalid_placement, 'font': ('Consolas', 10)}
medium_label_style = {'background': background_color, 'foreground': on_background_color, 'font': ('Arial', 12)}
large_label_style = {'background': background_color, 'foreground': on_background_color, 'font': ('Arial', 15)}
xlarge_label_style = {'background': background_color, 'foreground': on_background_color, 'font': ('Arial', 20)}

main_menu_frame = Frame(self.master, background=background_color) # On crée le cadre principal
main_menu_frame.pack(expand=True) # On affiche le cadre dans la fenêtre
main_menu_frame.columnconfigure(4, weight=1)
Expand Down

0 comments on commit 2b1befa

Please sign in to comment.