From 5e329a88832a0c6fdbcc033eeeab57112fcc883e Mon Sep 17 00:00:00 2001 From: Jean-Pierre Martineau Date: Sun, 2 Aug 2026 03:28:28 -0400 Subject: [PATCH] Reapply "PicoCalc: title bar rule reads like a real frame's border" This reverts commit 975317bb2ea1d25159f6aaeebfd1bd57dfe8e293. --- meshterm/ui/tui/frame.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/meshterm/ui/tui/frame.py b/meshterm/ui/tui/frame.py index 3299161..d49c92f 100644 --- a/meshterm/ui/tui/frame.py +++ b/meshterm/ui/tui/frame.py @@ -165,26 +165,37 @@ def _panel(screen: Screen, inner_w: int, viewport: int, active: bool) -> Panel: def _title_bar(screen: Screen, cols: int, more_above: bool, more_below: bool) -> Text: - """The borderless frame's one-row title bar: title, a muted rule, clip arrows. + """The borderless frame's one-row title bar: title, a bold rule, clip arrows. The Panel border's whole vocabulary — where you are (title) and whether the list continues (the ``↑↓ more`` subtitle) — compressed into a single row so the body wins back three rows and four columns on the PicoCalc. Shape: ``─ Title ───────── ↑↓``, echoing :func:`~meshterm.ui.menus.section_heading`'s heading language. + + The rule itself stands in for the Panel border this frame has none of, so it takes + ``border_style`` (``"accent"``) directly — the same bold weight a real border draws + in — rather than :func:`~meshterm.ui.theme.hint_style`'s muted variant, which is for + auxiliary text riding *alongside* a border (a footer hint, the subtitle's own + "more" label below), not the border's own glyphs. The ``↑↓`` clip arrows keep that + muted hint style, matching a bordered panel's own subtitle. There is no corner to + light the way :func:`~meshterm.ui.tui.glow.apply_corner_glow` lights a real frame's + top-left — that pass needs a truecolor blend this platform's 16-slot palette can't + render, so the rule is uniformly bold rather than fading from one. """ + border = "accent" bar = Text() - bar.append("─ ", style="hint.accent") + bar.append("─ ", style=border) if screen.title: - bar.append(screen.title, style=title_style("accent")) + bar.append(screen.title, style=title_style(border)) bar.append(" ", style=None) tail = "" if more_above or more_below: tail = ("↑" if more_above else " ") + ("↓" if more_below else " ") fill = cols - bar.cell_len - (len(tail) + 1 if tail else 0) if fill > 0: - bar.append("─" * fill, style="hint.accent") + bar.append("─" * fill, style=border) if tail: - bar.append(" " + tail, style="hint.accent") + bar.append(" " + tail, style=hint_style(border)) bar.truncate(cols) return bar