diff --git a/debug.py b/debug.py index 3d6bcd8..d88efd1 100644 --- a/debug.py +++ b/debug.py @@ -73,6 +73,8 @@ if __name__ == "__main__": func=lambda s: print("Icon Btn 1"), iconname="apple", iconsize=16, w=32).pack(side='left') magictk.ButtonFill(frame4, color_type="primary", func=lambda s: print("Icon Btn 2"), iconname="apple", iconsize=16, w=32).pack(side='left') + magictk.ButtonLight(frame4, + func=lambda s: print("Icon Btn 3"), iconname="apple", iconsize=16, w=32).pack(side='left') frame4.pack() frame6 = magictk.Frame(win) diff --git a/magictk/button.py b/magictk/button.py index 49e2ab6..f0ff044 100644 --- a/magictk/button.py +++ b/magictk/button.py @@ -305,11 +305,11 @@ class ButtonFill(Button): py = y+x_n+1 lcolor = j g_color = color_tmpl.mix_color( - "#FFFFFF", self.color[self._color_bd], int((1-lcolor/255)*1000)/1000) + self._color_text, self.color[self._color_bd], int((1-lcolor/255)*1000)/1000) f_color = color_tmpl.mix_color( - "#FFFFFF", self.color[self._color_fg1], int((1-lcolor/255)*1000)/1000) + self._color_text, self.color[self._color_fg1], int((1-lcolor/255)*1000)/1000) h_color = color_tmpl.mix_color( - "#FFFFFF", self.color[self._color_fg2], int((1-lcolor/255)*1000)/1000) + self._color_text, self.color[self._color_fg2], int((1-lcolor/255)*1000)/1000) obj = self.canvas.create_rectangle( px, py, px, py, width=0, fill=g_color) @@ -386,7 +386,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: dict = None, _dis_color=None, iconname="", iconsize=24): + def __init__(self, master=None, root_anim=None, color_type="plain", w=80, h=30, text="Button", func=lambda s: print("Press"), color_list: dict = None, _dis_color=None, iconname="", iconsize=24): if (_dis_color is None): self._color_bd = color_type self._color_bg = color_type diff --git a/magictk/color_tmpl.py b/magictk/color_tmpl.py index bd40e89..e5f08da 100644 --- a/magictk/color_tmpl.py +++ b/magictk/color_tmpl.py @@ -27,6 +27,10 @@ default_color = { "info_light3": "#B1B3B8", "info_dark": "#73767A", "plain": "#606266", + "plain_light": "#C6E2FF", + "plain_light2": "#ECF5FF", + "plain_light3": "#79BBFF", + "plain_dark": "#337ECC", "primary_text": "#303133", "regular_text": "#606266", "secondary_text": "#909399",