thread theme get

This commit is contained in:
dez 2024-02-07 15:03:15 +01:00
parent 87a09ba29f
commit b50cdd3165

View file

@ -5,6 +5,7 @@ from theme_ctk_auto import generate_theme_json
import tempfile import tempfile
import os import os
import threading
def get_temp_folder(): def get_temp_folder():
# Get the current user's temporary directory # Get the current user's temporary directory
@ -25,8 +26,16 @@ def main_win():
col_theme = None col_theme = None
is_dark = None is_dark = None
def theme_thread():
nonlocal col_background, col_theme, is_dark
col_background, col_theme, is_dark = get_theme_win()
generate_theme_json(dow_path, col_theme, is_dark)
theme_thread = threading.Thread(target=theme_thread)
theme_thread.start()
get_deps_win(dow_path) get_deps_win(dow_path)
col_background, col_theme, is_dark = get_theme_win()
generate_theme_json(dow_path, col_theme, is_dark) theme_thread.join()
run_installer(dow_path, is_dark) run_installer(dow_path, is_dark)