diff --git a/src/gui_main.py b/src/gui_main.py index fa0caea..90b2b07 100644 --- a/src/gui_main.py +++ b/src/gui_main.py @@ -54,7 +54,7 @@ def run_installer(download_folder_tmp, col_isDark): widgets = [] spacing_top = 10 # Adjust the spacing as needed - + for index, spec in enumerate(widget_specs): widget = create_widget(spec, container) if widget: @@ -66,7 +66,6 @@ def run_installer(download_folder_tmp, col_isDark): return widgets - def create_widget(spec, master): global progress_bar if isinstance(spec, tuple): @@ -80,6 +79,8 @@ def run_installer(download_folder_tmp, col_isDark): # Remove the 'text' argument if it exists widget_args.pop('text', None) return CTkComboBox(master=master, **widget_args) + elif widget_class == CTkCheckBox: + return CTkCheckBox(master=master, **widget_args) else: return spec(master=master) @@ -120,8 +121,8 @@ def run_installer(download_folder_tmp, col_isDark): tabs = { "Tab1": [ (CTkComboBox, {"text": "Language", "values": ["London", "Britan", "New York"]}), - (CTkComboBox, {"text": "Theme", "values": ["System", "Light", "Dark"]}), - (CTkCheckBox, {"text": f"Force {'Dark' if col_isDark else 'Light'} on every website"}), + (CTkComboBox, {"text": "Theme", "values": [f"System {'(Dark)' if col_isDark else '(Light)'}", "Light", "Dark"]}), + (CTkCheckBox, {"text": f"Force {'dark' if col_isDark else 'light'} mode"}), (CTkButton, {"text": "Install", "command": switch_to_install_tab}), (CTkButton, {"text": "Customise", "command": switch_to_next_tab}), ],