mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
Update ctk_button.py
fixed the display of text on the opposite (when hovering over it) button module. That is, when you hover over the button, if the colors are bright, then the text merges with the background, this behavior was added in the `_on_enter` and `_on_leave` functions, respectively
This commit is contained in:
parent
61adb1da07
commit
952259b215
@ -488,7 +488,8 @@ class CTkButton(CTkBaseClass):
|
||||
|
||||
# set text_label bg color to button hover color
|
||||
if self._text_label is not None:
|
||||
self._text_label.configure(bg=self._apply_appearance_mode(inner_parts_color))
|
||||
self._text_label.configure(bg=self._apply_appearance_mode(inner_parts_color),
|
||||
fg=self._apply_appearance_mode(self._fg_color))
|
||||
|
||||
# set image_label bg color to button hover color
|
||||
if self._image_label is not None:
|
||||
@ -509,7 +510,8 @@ class CTkButton(CTkBaseClass):
|
||||
|
||||
# set text_label bg color (label color)
|
||||
if self._text_label is not None:
|
||||
self._text_label.configure(bg=self._apply_appearance_mode(inner_parts_color))
|
||||
self._text_label.configure(bg=self._apply_appearance_mode(inner_parts_color),
|
||||
fg=self._apply_appearance_mode(self._text_color))
|
||||
|
||||
# set image_label bg color (image bg color)
|
||||
if self._image_label is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user