diff --git a/magictk/button.py b/magictk/button.py index 88c2a1f..4396fb5 100644 --- a/magictk/button.py +++ b/magictk/button.py @@ -75,7 +75,7 @@ class Button: self._fill_fc[n], self._fill_hc[n]) n += 1 - def __init__(self, master=None, root_anim=None, w=80, h=30, text="Button", func=lambda s: print("Press"), color_list: None | dict = None, _set_defaultcolor=None): + def __init__(self, master=None, root_anim=None, w=80, h=30, text="Button", func=lambda s: print("Press"), color_list: dict = None, _set_defaultcolor=None): global use_font use_font = fontconfig.getfont() self._fill_obj = [] @@ -305,7 +305,7 @@ class ButtonFill(Button): x_n += 1 y_n += 1 - def __init__(self, master=None, root_anim=None, color_type="primary", w=80, h=30, text="Button", func=lambda s: print("Press"), color_list: None | dict = None, _dis_color=None): + def __init__(self, master=None, root_anim=None, color_type="primary", w=80, h=30, text="Button", func=lambda s: print("Press"), color_list: dict = None, _dis_color=None): if (_dis_color is None): self._color_bd = color_type self._color_bg = color_type diff --git a/magictk/checkbox.py b/magictk/checkbox.py index 3743792..70281f5 100644 --- a/magictk/checkbox.py +++ b/magictk/checkbox.py @@ -119,7 +119,7 @@ class Checkbox(button.ButtonFill): self._fill_fc[n], self._fill_hc[n]) n += 1 - def __init__(self, master=None, root_anim=None, color_type="primary", w=80, h=16, text="Button", color_list: None | dict = None, group: None = None): + def __init__(self, master=None, root_anim=None, color_type="primary", w=80, h=16, text="Button", color_list: dict = None, group: None = None): global use_font use_font = fontconfig.getfont() self._color_bd = "border_base" @@ -129,27 +129,6 @@ class Checkbox(button.ButtonFill): self._color_fg2 = "primary_dark" super().__init__(master=master, root_anim=root_anim, w=w, h=h, text=text, color_list=color_list, color_type=color_type, _dis_color=True) - - # self.w = max(80, w) - # self.h = 16 - # self.text = text - # self._fill_func = [] - # self.__master = master - # if (color_list is not None): - # self.color = color_list - # if (root_anim == None): - # self.root = master.root - # else: - # self.root = root_anim - - # self.canvas = tkinter.Canvas( - # master, bg=self.color["background"], width=self.w, height=self.h, borderwidth=0, bd=0, highlightcolor=self.color["background"], highlightthickness=0) - - # self._draw() - # self.__update_color() - # self.__bind_event() - # self.bind_anim() - if (group is not None): group._add_checkbox(self) diff --git a/magictk/entry.py b/magictk/entry.py index ccf9e8d..186d299 100644 --- a/magictk/entry.py +++ b/magictk/entry.py @@ -111,7 +111,7 @@ class Entry: self.__fill_fc[n], self.__fill_hc[n]) n += 1 - def __init__(self, master=None, root_anim=None, w=200, h=30, text="Input", color_list: None | dict = None, items=[]): + def __init__(self, master=None, root_anim=None, w=200, h=30, text="Input", color_list: dict = None, items=[]): set_font() self.input_text = "" self.items = items diff --git a/magictk/progressbar.py b/magictk/progressbar.py index 40975b3..c4732fb 100644 --- a/magictk/progressbar.py +++ b/magictk/progressbar.py @@ -58,7 +58,7 @@ class ProgressBar: x_n += 1 y_n += 1 - def __init__(self, master=None, root_anim=None, w=200, h=8, colors="primary", color_list: None | dict = None): + def __init__(self, master=None, root_anim=None, w=200, h=8, colors="primary", color_list: dict = None): self.w = max(200, w) self.h = 8 self.__master = master diff --git a/magictk/select.py b/magictk/select.py index ab5a5c5..fb89308 100644 --- a/magictk/select.py +++ b/magictk/select.py @@ -45,7 +45,7 @@ class Select(button.Button): x_n += 1 y_n += 1 - def __init__(self, master=None, root_anim=None, w=200, h=30, text="Select", color_list: None | dict = None, items=[]): + def __init__(self, master=None, root_anim=None, w=200, h=30, text="Select", color_list: dict = None, items=[]): global use_font use_font = fontconfig.getfont() self.__arrow_json = json.loads(photoload.loadres("selectarrow")) diff --git a/magictk/submenu.py b/magictk/submenu.py index bcd3d93..d6200e2 100644 --- a/magictk/submenu.py +++ b/magictk/submenu.py @@ -121,7 +121,7 @@ class Menu: if (self.__closecallback is not None): self.__closecallback(self) - def __init__(self, root, menuobj: MenuObjs, w=200, h=300, x=100, y=300, color_list: None | dict = None, closeonleave=True, fontsize=10, closecallback=None): + def __init__(self, root, menuobj: MenuObjs, w=200, h=300, x=100, y=300, color_list: dict = None, closeonleave=True, fontsize=10, closecallback=None): global use_font use_font = fontconfig.getfont() self.__closecallback = closecallback diff --git a/magictk/window.py b/magictk/window.py index 1e28d7e..fb73df6 100644 --- a/magictk/window.py +++ b/magictk/window.py @@ -152,7 +152,7 @@ class Window(ttk.Frame): titles.bind("", move_win) titles.bind("", special_move) - def __init__(self, w=500, h=350, title="MagicTk", color_list: None | dict = None) -> None: + def __init__(self, w=500, h=350, title="MagicTk", color_list: dict = None) -> None: self.root = self self.title = title self.w = w