From 351bcfa17014571b729dab12a22142e47b3d27de Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Wed, 25 Dec 2019 18:28:50 -0500 Subject: [PATCH] Back out the row padding change. Fixed crash in set_icon --- PySimpleGUI.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 71b1eca7..e6e431ef 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -5666,9 +5666,9 @@ class Window: self.WindowIcon = wicon return + wicon = icon try: self.TKroot.iconbitmap(icon) - wicon = icon except: try: wicon = tkinter.PhotoImage(file=icon) @@ -9272,7 +9272,8 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form): # row_should_expand = False - tk_row_frame.pack(side=tk.TOP, anchor=anchor, expand=row_should_expand, fill=tk.BOTH if row_should_expand else tk.NONE) + tk_row_frame.pack(side=tk.TOP, anchor=anchor, 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])