Merge pull request #904 from MikeTheWatchGuy/Dev-latest
Update PySimpleGUI.py
This commit is contained in:
commit
072fecf761
|
@ -1360,6 +1360,8 @@ class Button(Element):
|
||||||
self.TKButton = None
|
self.TKButton = None
|
||||||
self.Target = target
|
self.Target = target
|
||||||
self.ButtonText = button_text
|
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.ButtonColor = button_color if button_color else DEFAULT_BUTTON_COLOR
|
||||||
self.ImageFilename = image_filename
|
self.ImageFilename = image_filename
|
||||||
self.ImageData = image_data
|
self.ImageData = image_data
|
||||||
|
@ -1529,6 +1531,8 @@ class Button(Element):
|
||||||
if text is not None:
|
if text is not None:
|
||||||
self.TKButton.configure(text=text)
|
self.TKButton.configure(text=text)
|
||||||
self.ButtonText = 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):
|
if button_color != (None, None):
|
||||||
self.TKButton.config(foreground=button_color[0], background=button_color[1])
|
self.TKButton.config(foreground=button_color[0], background=button_color[1])
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in New Issue