Merge pull request #485 from MikeTheWatchGuy/Dev-latest

Dev latest
This commit is contained in:
MikeTheWatchGuy 2018-10-15 20:08:28 -04:00 committed by GitHub
commit 146255bf34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 76 additions and 2 deletions

74
Demo_Nice_Buttons.py Normal file

File diff suppressed because one or more lines are too long

View File

@ -3363,7 +3363,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
photo = photo.subsample(element.ImageSubsample)
else:
width, height = photo.width(), photo.height()
tkbutton.config(image=photo, width=width, height=height)
tkbutton.config(image=photo, compound=tk.CENTER, width=width, height=height)
tkbutton.image = photo
if element.ImageData: # if button has an image on it
tkbutton.config(highlightthickness=0)
@ -3374,7 +3374,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
photo = photo.subsample(element.ImageSubsample)
else:
width, height = photo.width(), photo.height()
tkbutton.config(image=photo, width=width, height=height)
tkbutton.config(image=photo, compound=tk.CENTER, width=width, height=height)
tkbutton.image = photo
if width != 0:
tkbutton.configure(wraplength=wraplen+10) # set wrap to width of widget