Fixed: Load AVG being drawn outside box on small sizes

pull/81/head
aristocratos 4 years ago
parent 7593363165
commit 52053dbd84

@ -1578,6 +1578,7 @@ class CpuBox(Box, SubBox):
if cy < bh - 1: cy = bh - 1 if cy < bh - 1: cy = bh - 1
if cy < bh and cc < cls.box_columns:
if cls.column_size == 2 and cpu.got_sensors: if cls.column_size == 2 and cpu.got_sensors:
lavg = f' Load AVG: {" ".join(str(l) for l in cpu.load_avg):^19.19}' lavg = f' Load AVG: {" ".join(str(l) for l in cpu.load_avg):^19.19}'
elif cls.column_size == 2 or (cls.column_size == 1 and cpu.got_sensors): elif cls.column_size == 2 or (cls.column_size == 1 and cpu.got_sensors):
@ -3257,11 +3258,11 @@ class Menu:
key = Key.get() key = Key.get()
if key == "mouse_click" and not mouse_over: if key == "mouse_click" and not mouse_over:
key = "m" key = "M"
if key == "q": if key == "q":
clean_quit() clean_quit()
elif key in ["escape", "m"]: elif key in ["escape", "M"]:
cls.close = True cls.close = True
break break
elif key in ["up", "mouse_scroll_up", "shift_tab"]: elif key in ["up", "mouse_scroll_up", "shift_tab"]:
@ -3740,7 +3741,7 @@ class Menu:
elif key == "q": elif key == "q":
clean_quit() clean_quit()
elif key in ["escape", "o", "f2"]: elif key in ["escape", "o", "M", "f2"]:
cls.close = True cls.close = True
break break
elif key == "enter" and selected in ["update_ms", "disks_filter", "custom_cpu_name", "net_download_min", "net_upload_min"]: elif key == "enter" and selected in ["update_ms", "disks_filter", "custom_cpu_name", "net_download_min", "net_upload_min"]:

Loading…
Cancel
Save