diff --git a/customtkinter/__init__.py b/customtkinter/__init__.py index 32624b9..141741b 100644 --- a/customtkinter/__init__.py +++ b/customtkinter/__init__.py @@ -22,7 +22,7 @@ def enable_macos_darkmode(): sys.stderr.write("WARNING (customtkinter.enable_macos_darkmode): " + "This command forces macOS dark-mode on all programs." + "This can cause bugs on some other programs.\n" + - "Disable it by calling customtkinter.disable_macos_darkmode at the end of the program.\n") + "Disable it by calling customtkinter.disable_macos_darkmode() at the end of the program.\n") else: sys.stderr.write("WARNING (customtkinter.enable_macos_darkmode): " + "Currently this works only with anaconda python version (Tcl/Tk >= 8.6.9).\n" + @@ -58,7 +58,7 @@ def deactivate_threading(): AppearanceModeTracker.init_listener_function(no_thread=True) sys.stderr.write("WARNING (customtkinter.deactivate_threading): Automatic threaded search for a change of the " + "system appearance mode is deativated now.\nYou have to update the appearance mode manually " + - "in your mainloop by calling customtkinter.update_theme() every time.\n") + "in your mainloop by calling customtkinter.update_appearance_mode() every time.\n") def activate_threading(): diff --git a/customtkinter/appearance_mode_tracker.py b/customtkinter/appearance_mode_tracker.py index d10af1f..8dc2a69 100644 --- a/customtkinter/appearance_mode_tracker.py +++ b/customtkinter/appearance_mode_tracker.py @@ -1,8 +1,13 @@ from threading import Thread from time import sleep -import darkdetect import sys +if sys.platform == "darwin": + try: + import darkdetect + except ImportError as e: + sys.stderr.write(e + "\nYou have to install darkdetect: pip install darkdetect") + class SystemAppearanceModeListener(Thread): """ This class checks for a system appearance change diff --git a/customtkinter/customtkinter_color_manager.py b/customtkinter/customtkinter_color_manager.py index 05518d9..a631d73 100644 --- a/customtkinter/customtkinter_color_manager.py +++ b/customtkinter/customtkinter_color_manager.py @@ -16,8 +16,6 @@ class CTkColorManager: cls.MAIN = (hex_color, hex_color) cls.MAIN_HOVER = (hex_color_hover, hex_color_hover) - print(CTkColorManager.MAIN, id(CTkColorManager)) - @classmethod def set_theme(cls, main_color): if main_color.lower() == "green":