mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
fixed some configure bugs #590
This commit is contained in:
parent
cea48c3501
commit
1387e834b5
@ -244,6 +244,18 @@ class CTkSwitch(CTkBaseClass):
|
|||||||
self._text_label.configure(bg=self._apply_appearance_mode(self._bg_color))
|
self._text_label.configure(bg=self._apply_appearance_mode(self._bg_color))
|
||||||
|
|
||||||
def configure(self, require_redraw=False, **kwargs):
|
def configure(self, require_redraw=False, **kwargs):
|
||||||
|
if "corner_radius" in kwargs:
|
||||||
|
self._corner_radius = kwargs.pop("corner_radius")
|
||||||
|
require_redraw = True
|
||||||
|
|
||||||
|
if "border_width" in kwargs:
|
||||||
|
self._border_width = kwargs.pop("border_width")
|
||||||
|
require_redraw = True
|
||||||
|
|
||||||
|
if "button_length" in kwargs:
|
||||||
|
self._button_length = kwargs.pop("button_length")
|
||||||
|
require_redraw = True
|
||||||
|
|
||||||
if "switch_width" in kwargs:
|
if "switch_width" in kwargs:
|
||||||
self._switch_width = kwargs.pop("switch_width")
|
self._switch_width = kwargs.pop("switch_width")
|
||||||
self._canvas.configure(width=self._apply_widget_scaling(self._switch_width))
|
self._canvas.configure(width=self._apply_widget_scaling(self._switch_width))
|
||||||
@ -296,10 +308,6 @@ class CTkSwitch(CTkBaseClass):
|
|||||||
self._border_color = kwargs.pop("border_color")
|
self._border_color = kwargs.pop("border_color")
|
||||||
require_redraw = True
|
require_redraw = True
|
||||||
|
|
||||||
if "border_width" in kwargs:
|
|
||||||
self._border_width = kwargs.pop("border_width")
|
|
||||||
require_redraw = True
|
|
||||||
|
|
||||||
if "hover" in kwargs:
|
if "hover" in kwargs:
|
||||||
self._hover = kwargs.pop("hover")
|
self._hover = kwargs.pop("hover")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user