allow multiple style strings in font tuple #759

This commit is contained in:
Tom Schimansky
2022-12-06 18:29:09 +01:00
parent 6a3fa7fa29
commit 868b2a2f42
3 changed files with 4 additions and 5 deletions

View File

@@ -82,8 +82,8 @@ class CTkScalingBaseClass:
return font
elif len(font) == 2:
return font[0], -abs(round(font[1] * self.__widget_scaling))
elif len(font) == 3:
return font[0], -abs(round(font[1] * self.__widget_scaling)), font[2]
elif 3 <= len(font) <= 6:
return font[0], -abs(round(font[1] * self.__widget_scaling)), font[2:]
else:
raise ValueError(f"Can not scale font {font}. font needs to be tuple of len 1, 2 or 3")