Correctly type theme ui_scale variables

Technically `theme.startup_ui_scale` should be `float` to match with
`default_ui_scale` from tkinter, but we store it in the config as `int`,
so go with that.
This commit is contained in:
Athanasius committed 2022-12-23 14:47:31 +00:00
1 parent 4de83747f8
commit eaaa6fead0
2 files changed
+6 -3

No files matched your search

+2 -2
View File
@@ -137,8 +137,8 @@ class _Theme(object):
self.widgets_pair: List = []
self.defaults: Dict = {}
self.current: Dict = {}
self.default_ui_scale = None # None == not yet known
self.startup_ui_scale = None
self.default_ui_scale: float | None = None # None == not yet known
self.startup_ui_scale: int | None = None
def register(self, widget: tk.Widget | tk.BitmapImage) -> None: # noqa: CCR001, C901
# Note widget and children for later application of a theme. Note if