Skip to content

Commit

Permalink
added text color configuration for switch TomSchimansky#1497
Browse files Browse the repository at this point in the history
  • Loading branch information
TomSchimansky committed Apr 24, 2023
1 parent 121f571 commit b60859d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions customtkinter/windows/widgets/ctk_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ def configure(self, require_redraw=False, **kwargs):
self._fg_color = self._check_color_type(kwargs.pop("fg_color"))
require_redraw = True

if "border_color" in kwargs:
self._border_color = self._check_color_type(kwargs.pop("border_color"), transparency=True)
require_redraw = True

if "progress_color" in kwargs:
self._progress_color = self._check_color_type(kwargs.pop("progress_color"), transparency=True)
require_redraw = True
Expand All @@ -311,8 +315,12 @@ def configure(self, require_redraw=False, **kwargs):
self._button_hover_color = self._check_color_type(kwargs.pop("button_hover_color"))
require_redraw = True

if "border_color" in kwargs:
self._border_color = self._check_color_type(kwargs.pop("border_color"), transparency=True)
if "text_color" in kwargs:
self._text_color = self._check_color_type(kwargs.pop("text_color"))
require_redraw = True

if "text_color_disabled" in kwargs:
self._text_color_disabled = self._check_color_type(kwargs.pop("text_color_disabled"))
require_redraw = True

if "hover" in kwargs:
Expand Down

0 comments on commit b60859d

Please sign in to comment.