Make gauge update immediately in 1 jump
This commit is contained in:
parent
1b4c63e15c
commit
dac6b73045
|
@ -288,8 +288,8 @@ def main(location):
|
|||
if gauge.change():
|
||||
new_angle = cpu_percent*180/100
|
||||
window['-gauge VALUE-'].update(f'{int(cpu_percent)}%')
|
||||
gauge.change(degree=new_angle, step=new_angle)
|
||||
|
||||
gauge.change(degree=new_angle, step=180)
|
||||
gauge.change()
|
||||
# ----------- update the graphics and text in the window ------------
|
||||
# update the window, wait for a while, then check for exit
|
||||
event, values = window.read(timeout=UPDATE_FREQUENCY_MILLISECONDS)
|
||||
|
|
|
@ -298,8 +298,8 @@ def main(location):
|
|||
new_angle = ram_percent*180/100
|
||||
window['-gauge VALUE-'].update(f'{ram_percent}')
|
||||
window['-RAM USED-'].update(f'{human_size(ram.used)}')
|
||||
gauge.change(degree=new_angle, step=new_angle)
|
||||
|
||||
gauge.change(degree=new_angle, step=180)
|
||||
gauge.change()
|
||||
# ----------- update the graphics and text in the window ------------
|
||||
|
||||
# update the window, wait for a while, then check for exit
|
||||
|
|
Loading…
Reference in New Issue