widgets spacing from top

This commit is contained in:
admin 2024-02-11 01:34:33 +01:00
parent 42a440a47b
commit 20d423497b

View file

@ -53,15 +53,16 @@ def run_installer(download_folder_tmp, col_isDark):
widget_specs = tabs.get(current_tab, [])
widgets = []
spacing_top = 10 # Adjust the spacing as needed
spacing = 15
spacing_top = 130
for index, spec in enumerate(widget_specs):
widget = create_widget(spec, container)
if widget:
if index == 0: # Add spacing from the top only for the first widget
widget.pack(pady=spacing_top, padx=20)
if index == 0: # Apply spacing only to the top of the first widget
widget.pack(pady=(spacing_top, spacing), padx=20)
else:
widget.pack(pady=spacing_top, padx=20)
widget.pack(pady=spacing, padx=20) # No spacing for other widgets
widgets.append(widget)
return widgets
@ -102,6 +103,7 @@ def run_installer(download_folder_tmp, col_isDark):
else:
return spec(master=master)
# Function to switch to a specified tab
def switch_to_tab(tabname):
global visible_widgets