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.
This commit is contained in:
Orsiris de Jong 2019-01-02 11:23:29 +01:00 committed by GitHub
parent 8b8ee28aa2
commit 8839fce88f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3418,7 +3418,7 @@ class Window:
self.Font = font if font else DEFAULT_FONT self.Font = font if font else DEFAULT_FONT
self.RadioDict = {} self.RadioDict = {}
self.BorderDepth = border_depth 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.AutoClose = auto_close
self.NonBlocking = False self.NonBlocking = False
self.TKroot = None self.TKroot = None