Merge pull request #904 from MikeTheWatchGuy/Dev-latest

Update PySimpleGUI.py
This commit is contained in:
MikeTheWatchGuy 2018-12-11 15:49:43 -05:00 committed by GitHub
commit 072fecf761
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -1360,6 +1360,8 @@ class Button(Element):
self.TKButton = None
self.Target = target
self.ButtonText = button_text
if sys.platform == 'darwin' and button_color is not None:
print('Button *** WARNING - Button colors are not supported on the Mac ***')
self.ButtonColor = button_color if button_color else DEFAULT_BUTTON_COLOR
self.ImageFilename = image_filename
self.ImageData = image_data
@ -1529,6 +1531,8 @@ class Button(Element):
if text is not None:
self.TKButton.configure(text=text)
self.ButtonText = text
if sys.platform == 'darwin' and button_color != (None, None):
print('Button.Update *** WARNING - Button colors are not supported on the Mac***')
if button_color != (None, None):
self.TKButton.config(foreground=button_color[0], background=button_color[1])
except: