From 8e03891ed8272b6214e9f6f6570c9df76e02f650 Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Sun, 9 Jun 2019 14:04:59 -0400 Subject: [PATCH] Compacted code --- PySimpleGUI.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index e80c8b99..d1e7201e 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -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])