From 8839fce88fe96d87581cff1f0431afd97519c40f Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Wed, 2 Jan 2019 11:23:29 +0100 Subject: [PATCH] Fixed default Icon not working for Popups When setting an icon via SetOptions(icon=file), the main window uses that icon, but Popups and sub windows won't unless they're called with icon=None argument. This propagates the user_defined_icon as default icon, unless otherwise specified. --- PySimpleGUI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 64aa3222..1e7c9cc8 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -3418,7 +3418,7 @@ class Window: self.Font = font if font else DEFAULT_FONT self.RadioDict = {} self.BorderDepth = border_depth - self.WindowIcon = icon if icon is not None else Window.user_defined_icon + self.WindowIcon = Window.user_defined_icon if Window.user_defined_icon is not None else icon if icon is not None else DEFAULT_WINDOW_ICON self.AutoClose = auto_close self.NonBlocking = False self.TKroot = None