From cb1d5bea6d08ce2fd318ad415a45dc3e10e254e0 Mon Sep 17 00:00:00 2001 From: profitroll Date: Mon, 23 Jan 2023 12:16:19 +0100 Subject: [PATCH] Fixed windows-only import --- modules/theme_titlebar.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/theme_titlebar.py b/modules/theme_titlebar.py index 2c54498..5a5f034 100644 --- a/modules/theme_titlebar.py +++ b/modules/theme_titlebar.py @@ -1,7 +1,6 @@ import platform import sys import sv_ttk -from ctypes import byref, c_int, sizeof, windll from distutils.version import StrictVersion as Version from os import system from tkinter import Tcl, Toplevel @@ -9,6 +8,9 @@ from typing import Literal, Union from ttkthemes import ThemedTk +if sys.platform.startswith("win"): + from ctypes import byref, c_int, sizeof, windll + def theme_title_bar(window: Union[ThemedTk, Toplevel], mode: Literal["dark", "light"]) -> None: """