From 0512a932bbf3b87619b6a250f87eb7904d22d1f7 Mon Sep 17 00:00:00 2001 From: historia Date: Mon, 24 Aug 2026 04:53:43 -0400 Subject: feat: hide convert/config/start-stop menus if no valid installation --- app/ui/tui.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'app/ui/tui.py') diff --git a/app/ui/tui.py b/app/ui/tui.py index 7b6c740..bf17f7d 100644 --- a/app/ui/tui.py +++ b/app/ui/tui.py @@ -78,9 +78,10 @@ def flash(scr, text: str, kind: str = "warn") -> None: """Show a one-line notice until any key is pressed, then return. Used by the hub for "not set up yet"-style messages. KIND is a theme - key (warn/err/ok/info). Esc dismisses the notice (it does not abort). + key (warn/err/ok/info). The notice itself is the dialog's only + content (no "Notice" heading); Esc dismisses it (it does not abort). """ - frame = Frame(scr, "Notice", "Press any key to continue Esc = back") + frame = Frame(scr, "", "Press any key to continue Esc = back") frame.mark(text, frame.theme.get(kind, frame.theme["body"])) frame.cursor = None frame.draw() @@ -378,9 +379,10 @@ class Frame: inner_x = x0 + 1 inner_w = dialog_w - 2 - title = _fit(f" {self.title} ", inner_w) - _addstr(scr, y0 + 1, inner_x + max(0, (inner_w - len(title)) // 2), - title, theme["title"]) + if self.title: + title = _fit(f" {self.title} ", inner_w) + _addstr(scr, y0 + 1, inner_x + max(0, (inner_w - len(title)) // 2), + title, theme["title"]) if total_lines > visible: indicator = f" {self.scroll + 1}/{total_lines} " _addstr(scr, y0, max(x0 + 1, x0 + dialog_w - 1 - len(indicator)), -- cgit v1.2.3