From 1250afc9e5198345df00ea516df3f7452e86e387 Mon Sep 17 00:00:00 2001 From: Ramforth Date: Sun, 2 Nov 2025 22:27:28 +0100 Subject: [PATCH] Fix: Resolve AttributeError in CTkSwitch and ensure initial dark mode --- gui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui.py b/gui.py index 5d579c7..42deeac 100644 --- a/gui.py +++ b/gui.py @@ -37,6 +37,7 @@ class VideoConverterGUI: # anchor="w" (west) aligns it to the left self.mode_switch.pack(pady=10, padx=20, anchor="w") self.mode_switch.select() # Start in the "on" (Dark) state + self.toggle_mode() # Ensure initial mode is set based on switch state # --- Main Widgets --- self.label = customtkinter.CTkLabel(master, text="Select video file or enter URL:") @@ -88,7 +89,7 @@ class VideoConverterGUI: def toggle_mode(self): # Check if the switch is on (1) or off (0) - if self.mode_switch.is_selected(): + if self.mode_switch.get() == 1: customtkinter.set_appearance_mode("Dark") else: customtkinter.set_appearance_mode("Light")