diff --git a/customtkinter/__init__.py b/customtkinter/__init__.py index 8863ee5..0b2ec47 100644 --- a/customtkinter/__init__.py +++ b/customtkinter/__init__.py @@ -27,6 +27,8 @@ FontManager.load_font(os.path.join(script_directory, "assets", "fonts", "Roboto" # load font necessary for rendering the widgets on Windows, Linux if FontManager.load_font(os.path.join(script_directory, "assets", "fonts", "CustomTkinter_shapes_font-fine.otf")) is True: Settings.circle_font_is_ready = True +else: + Settings.circle_font_is_ready = False if Settings.preferred_drawing_method == "font_shapes": sys.stderr.write("customtkinter.__init__ warning: " + diff --git a/customtkinter/appearance_mode_tracker.py b/customtkinter/appearance_mode_tracker.py index ef2b2cb..e274c39 100644 --- a/customtkinter/appearance_mode_tracker.py +++ b/customtkinter/appearance_mode_tracker.py @@ -10,8 +10,10 @@ try: sys.stderr.write("WARNING: You have to upgrade the darkdetect library: pip3 install --upgrade darkdetect\n") if sys.platform != "darwin": exit() -except: - pass +except ImportError as err: + raise err +except Exception: + sys.stderr.write("customtkinter.appearance_mode_tracker warning: failed to import darkdetect") class AppearanceModeTracker: diff --git a/test/manual_integration_tests/test_button_antialiasing.py b/test/manual_integration_tests/test_button_antialiasing.py index 27b46f1..c75cf34 100644 --- a/test/manual_integration_tests/test_button_antialiasing.py +++ b/test/manual_integration_tests/test_button_antialiasing.py @@ -29,9 +29,9 @@ f4.grid(row=0, column=3, rowspan=1, columnspan=1, sticky="nsew") f4.grid_columnconfigure(0, weight=1) for i in range(0, 21, 1): - #b = customtkinter.CTkButton(f1, corner_radius=i, current_height=34, border_width=2, text=f"{i} {i-2}", - # border_color="white", fg_color=None, text_color="white") - b = tkinter.Button(f1, text=f"{i} {i-2}", width=20) + b = customtkinter.CTkButton(f1, corner_radius=i, height=34, border_width=2, text=f"{i} {i-2}", + border_color="white", fg_color=None, text_color="white") + # b = tkinter.Button(f1, text=f"{i} {i-2}", width=20) b.grid(row=i, column=0, pady=5, padx=15, sticky="nsew") b = customtkinter.CTkButton(f2, corner_radius=i, height=34, border_width=0, text=f"{i}", @@ -46,5 +46,4 @@ for i in range(0, 21, 1): border_color="gray10", fg_color="#228da8") b.grid(row=i, column=0, pady=5, padx=15, sticky="nsew") -customtkinter.Settings.print_settings() app.mainloop()