Merge pull request #1532 from PySimpleGUI/Dev-latest

Compacted code
This commit is contained in:
MikeTheWatchGuy 2019-06-09 14:05:23 -04:00 committed by GitHub
commit f992beb519
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -6267,10 +6267,8 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
# ............................DONE WITH ROW pack the row of widgets ..........................#
# done with row, pack the row of widgets
# tk_row_frame.grid(row=row_num+2, sticky=tk.NW, padx=DEFAULT_MARGINS[0])
if row_should_expand:
tk_row_frame.pack(side=tk.TOP, anchor='nw', padx=toplevel_form.Margins[0], expand=True, fill=tk.BOTH)
else:
tk_row_frame.pack(side=tk.TOP, anchor='nw', padx=toplevel_form.Margins[0], expand=False)
tk_row_frame.pack(side=tk.TOP, anchor='nw', padx=toplevel_form.Margins[0],
expand=row_should_expand, fill=tk.BOTH if row_should_expand else tk.NONE)
if form.BackgroundColor is not None and form.BackgroundColor != COLOR_SYSTEM_DEFAULT:
tk_row_frame.configure(background=form.BackgroundColor)
toplevel_form.TKroot.configure(padx=toplevel_form.Margins[0], pady=toplevel_form.Margins[1])