From 8366e50d910b200ee40c0e9762f40c3a01f37969 Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Tue, 11 Dec 2018 15:49:22 -0500 Subject: [PATCH] Update PySimpleGUI.py A warning is now printed if platform is a Mac and a button color change is requested --- PySimpleGUI.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 7925702a..03cac015 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -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 @@ -1521,6 +1523,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: