mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
fixed font loading init
This commit is contained in:
@@ -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: " +
|
||||
|
||||
@@ -10,8 +10,10 @@ try:
|
||||
sys.stderr.write("WARNING: You have to update 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:
|
||||
|
||||
Reference in New Issue
Block a user