commit
b21874227f
|
@ -2985,7 +2985,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
|
||||
|
@ -5746,14 +5746,8 @@ ScrolledTextBox = PopupScrolled
|
|||
# Sets the icon to be used by default #
|
||||
# ===================================================#
|
||||
def SetGlobalIcon(icon):
|
||||
global _my_windows
|
||||
|
||||
try:
|
||||
with open(icon, 'r') as icon_file:
|
||||
pass
|
||||
except:
|
||||
raise FileNotFoundError
|
||||
_my_windows.user_defined_icon = icon
|
||||
if icon is not None:
|
||||
Window.user_defined_icon = icon
|
||||
return True
|
||||
|
||||
|
||||
|
@ -5803,15 +5797,9 @@ def SetOptions(icon=None, button_color=None, element_size=(None, None), button_e
|
|||
global DEFAULT_ELEMENT_TEXT_COLOR
|
||||
global DEFAULT_INPUT_TEXT_COLOR
|
||||
global DEFAULT_TOOLTIP_TIME
|
||||
global _my_windows
|
||||
|
||||
if icon:
|
||||
try:
|
||||
with open(icon, 'r') as icon_file:
|
||||
pass
|
||||
except:
|
||||
raise FileNotFoundError
|
||||
_my_windows.user_defined_icon = icon
|
||||
if icon is not None:
|
||||
Window.user_defined_icon = icon
|
||||
|
||||
if button_color != None:
|
||||
DEFAULT_BUTTON_COLOR = button_color
|
||||
|
@ -6889,6 +6877,7 @@ def PopupGetText(message, title=None, default_text='', password_char='', size=(N
|
|||
|
||||
def main():
|
||||
ChangeLookAndFeel('GreenTan')
|
||||
|
||||
layout = [
|
||||
[Text('Welcome to PySimpleGUI!', font='Arial 15', text_color='red')],
|
||||
[Text('You should be importing this module rather than running it', justification='l', size=(50, 1))],
|
||||
|
|
Loading…
Reference in New Issue