Merge pull request #5433 from PySimpleGUI/Dev-latest

Dev latest
This commit is contained in:
PySimpleGUI 2022-05-05 07:22:13 -04:00 committed by GitHub
commit 2a0e19c235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -84,7 +84,7 @@ window = make_window()
while True: while True:
event, values = window.read() event, values = window.read()
sg.Print(event, values) # sg.Print(event, values)
if event == sg.WIN_CLOSED or event == 'Exit': if event == sg.WIN_CLOSED or event == 'Exit':
break break
if event == 'Edit Me': if event == 'Edit Me':
@ -95,6 +95,7 @@ while True:
window = make_window() window = make_window()
if event == '-USE CUSTOM TITLEBAR-': if event == '-USE CUSTOM TITLEBAR-':
use_custom_titlebar = values['-USE CUSTOM TITLEBAR-'] use_custom_titlebar = values['-USE CUSTOM TITLEBAR-']
sg.set_options(use_custom_titlebar=use_custom_titlebar)
window.close() window.close()
window = make_window() window = make_window()
elif event == 'Version': elif event == 'Version':

View File

@ -29,7 +29,7 @@ def main():
layout = [[sg.Image(blank, key=('-IMAGE-', i), p=0, subsample=subsample) for i in range(max_digits)]] layout = [[sg.Image(blank, key=('-IMAGE-', i), p=0, subsample=subsample) for i in range(max_digits)]]
window = sg.Window('', layout, background_color='black', no_titlebar=True, grab_anywhere=True, right_click_menu=right_click_menu, location=location, enable_close_attempted_event=True, alpha_channel=alpha, metadata=subsample) window = sg.Window('', layout, background_color='black', no_titlebar=True, grab_anywhere=True, right_click_menu=right_click_menu, location=location, keep_on_top=True, enable_close_attempted_event=True, alpha_channel=alpha, metadata=subsample)
while True: while True:
event, values = window.read(timeout=300) event, values = window.read(timeout=300)