From 4d4e256a79211c6505831c9bb9a18fca2c0cd9df Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Fri, 26 Jun 2020 16:59:05 -0400 Subject: [PATCH] Simplified demo by removing sizes --- DemoPrograms/Demo_LED_Indicators_Text_Based.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/DemoPrograms/Demo_LED_Indicators_Text_Based.py b/DemoPrograms/Demo_LED_Indicators_Text_Based.py index 371d4c20..cc60caef 100644 --- a/DemoPrograms/Demo_LED_Indicators_Text_Based.py +++ b/DemoPrograms/Demo_LED_Indicators_Text_Based.py @@ -15,15 +15,16 @@ sg.theme('Light Brown 4') CIRCLE = '⚫' CIRCLE_OUTLINE = '⚪' -layout = [ [sg.Text('Status 1', size=(12,1)), sg.Text(CIRCLE_OUTLINE, size=(10,1), text_color='green', key='-LED0-')], - [sg.Text('Status 2', size=(12,1)), sg.Text(CIRCLE_OUTLINE, size=(10,1), text_color='red', key='-LED1-')], - [sg.Text('Status 3', size=(12,1)), sg.Text(CIRCLE_OUTLINE, size=(10,1), text_color='blue', key='-LED2-')]] +layout = [ [sg.Text('Status 1 '), sg.Text(CIRCLE_OUTLINE, text_color='green', key='-LED0-')], + [sg.Text('Status 2 '), sg.Text(CIRCLE_OUTLINE, text_color='red', key='-LED1-')], + [sg.Text('Status 3 '), sg.Text(CIRCLE_OUTLINE, text_color='blue', key='-LED2-')], + [sg.Button('Exit')]] window = sg.Window('Window Title', layout, font='Any 16') while True: event, values = window.read(timeout=200) - if event == sg.WIN_CLOSED: + if event == sg.WIN_CLOSED or event == 'Exit': break for i in range(3): if randint(1,100) < 25: