From 497e57f28fa4631d88e9506ec7bb16f5a2540f53 Mon Sep 17 00:00:00 2001 From: "June Knauth (tt)" Date: Fri, 20 Dec 2024 13:34:54 -0500 Subject: [PATCH] Add Compact mode toggle to UI Signed-off-by: June Knauth (tt) --- tt_smi/tt_smi.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tt_smi/tt_smi.py b/tt_smi/tt_smi.py index 8970621..100a692 100644 --- a/tt_smi/tt_smi.py +++ b/tt_smi/tt_smi.py @@ -75,6 +75,7 @@ class TTSMI(App): ("q, Q", "quit", "Quit"), ("h, H", "help", "Help"), ("d, D", "toggle_dark", "Toggle dark mode"), + ("c, C", "toggle_compact", "Toggle sidebar"), ("1", "tab_one", "Device info tab"), ("2", "tab_two", "Telemetry tab"), ("3", "tab_three", "Firmware tab"), @@ -589,6 +590,11 @@ def action_toggle_dark(self) -> None: """An action to toggle dark mode.""" self.dark = not self.dark + def action_toggle_compact(self) -> None: + """An action to toggle compact mode.""" + left_sidebar = self.query_one("#left_col") + left_sidebar.display = not left_sidebar.display + async def action_quit(self) -> None: """An [action](/guide/actions) to quit the app as soon as possible.""" global INTERRUPT_RECEIVED, TELEM_THREADS