Skip to content

Commit 80cfdbc

Browse files
committed
Check for COLOR_SYSTEM_DEFAULT in Button.update
1 parent 4b79837 commit 80cfdbc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

PySimpleGUI.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/python3
22
from wx import Font
33

4-
version = __version__ = "4.31.0.1 Unreleased\nChange Menu & ButtonMenu color and font default, renamed & refactored from FlexForm to Window in ConvertFlexToTK"
4+
version = __version__ = "4.31.0.2 Unreleased\nChange Menu & ButtonMenu color and font default, renamed & refactored from FlexForm to Window in ConvertFlexToTK, Button.update now checks for COLOR_SYSTEM_DEFAULT"
55

66
__version__ = version.split()[0] # For PEP 396 and PEP 345
77

@@ -3509,7 +3509,7 @@ def Update(self, text=None, button_color=(None, None), disabled=None, image_data
35093509
if text is not None:
35103510
self.TKButton.configure(text=text)
35113511
self.ButtonText = text
3512-
if button_color != (None, None):
3512+
if button_color != (None, None) and button_color != COLOR_SYSTEM_DEFAULT:
35133513
if isinstance(button_color, str):
35143514
try:
35153515
button_color = button_color.split(' on ')
@@ -3561,7 +3561,7 @@ def Update(self, text=None, button_color=(None, None), disabled=None, image_data
35613561
self.TKButton.pack_forget()
35623562
elif visible is True:
35633563
self.TKButton.pack(padx=self.pad_used[0], pady=self.pad_used[1])
3564-
if disabled_button_color != (None, None):
3564+
if disabled_button_color != (None, None) and disabled_button_color != COLOR_SYSTEM_DEFAULT:
35653565
if not self.UseTtkButtons:
35663566
self.TKButton['disabledforeground'] = disabled_button_color[0]
35673567
else:

0 commit comments

Comments
 (0)