Couple of fixes for getting location of popups
This commit is contained in:
parent
6349c5d818
commit
7aa4bb42ff
|
@ -409,13 +409,15 @@ def main():
|
|||
# this is result of hacking code down to 99 lines in total. Not tried it before. Interesting test.
|
||||
_, window = window.close(), make_window(loc)
|
||||
elif event == 'Set Main Font':
|
||||
font = sg.popup_get_text('Main Information Font and Size (e.g. courier 70)', default_text=sg.user_settings_get_entry('-main number font-'), keep_on_top=True)
|
||||
font = sg.popup_get_text('Main Information Font and Size (e.g. courier 70)', default_text=sg.user_settings_get_entry('-main number font-', main_number_font),location=window.current_location(), keep_on_top=True)
|
||||
if font:
|
||||
loc = window.current_location()
|
||||
sg.user_settings_set_entry('-main number font-', font)
|
||||
_, window = window.close(), make_window(loc)
|
||||
elif event == 'Set Title Font':
|
||||
font = sg.popup_get_text('Title Font and Size (e.g. courier 8)', default_text=sg.user_settings_get_entry('-title font-'), keep_on_top=True)
|
||||
font = sg.popup_get_text('Title Font and Size (e.g. courier 8)', default_text=sg.user_settings_get_entry('-title font-', title_font), location=window.current_location(), keep_on_top=True)
|
||||
if font:
|
||||
loc = window.current_location()
|
||||
sg.user_settings_set_entry('-title font-', font)
|
||||
_, window = window.close(), make_window(loc)
|
||||
|
||||
|
|
Loading…
Reference in New Issue