Skip to content

Commit

Permalink
Add Compact mode toggle to UI
Browse files Browse the repository at this point in the history
Signed-off-by: June Knauth (tt) <[email protected]>
  • Loading branch information
knauth committed Dec 20, 2024
1 parent 359c42a commit 497e57f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tt_smi/tt_smi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 497e57f

Please sign in to comment.