From c51d6709563a9474663a7e6d98397b5cc9516433 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Mon, 14 Aug 2023 12:22:12 -0400 Subject: [PATCH] Fixed bug in Button.update. Corrected when activeforeground and activebackground are set. Removing them in version above was a mistake --- PySimpleGUI.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 8b5a6467..d7b845b9 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -version = __version__ = "4.61.0.191 Unreleased" +version = __version__ = "4.61.0.192 Unreleased" _change_log = """ Changelog since 4.60.0 released to PyPI on 8-May-2022 @@ -454,6 +454,8 @@ _change_log = """ Fix typo of text in _widget_was_created 4.61.0.191 Fixed bug in Button.update. Was setting the activeforeground and activebackground which broke the mouseover or mouse press colors + 4.61.0.192 + Fixed bug in Button.update. Corrected when activeforeground and activebackground are set. Removing them in version above was a mistake """ @@ -5576,11 +5578,9 @@ class Button(Element): button_style.configure(style_name, background=bc[1]) else: if bc[0] not in (None, COLOR_SYSTEM_DEFAULT): - # self.TKButton.config(foreground=bc[0], activeforeground=bc[0]) # Removed 13-Aug-2023. Was causing mouseover to not work - self.TKButton.config(foreground=bc[0]) + self.TKButton.config(foreground=bc[0], activebackground=bc[0]) if bc[1] not in (None, COLOR_SYSTEM_DEFAULT): - # self.TKButton.config(background=bc[1], activebackground=bc[1]) # Removed 13-Aug-2023. Was causing mouseover to not work - self.TKButton.config(background=bc[1]) + self.TKButton.config(background=bc[1], activeforeground=bc[1]) self.ButtonColor = bc if disabled is True: self.TKButton['state'] = 'disabled'