checkbox support for tabs
This commit is contained in:
parent
7a725dda54
commit
80c6ed7573
1 changed files with 5 additions and 4 deletions
|
@ -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}),
|
||||
],
|
||||
|
|
Reference in a new issue