From 5a81b15ab5f9c30f132fdcae40c0673b9ccf95a6 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Martineau Date: Sun, 2 Aug 2026 02:52:17 -0400 Subject: [PATCH] PicoCalc: title bar rule reads like a real frame's border MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The borderless title bar's rule (leading dashes, title, trailing fill) was styled hint.accent — the muted style theme.py reserves for text riding alongside a border (a footer hint, a subtitle's "more" label), not the border's own glyphs. A bordered Panel's border draws in border_style directly ("accent", already bold in both themes), so the rule read dimmer than the frame it's standing in for. The rule now takes "accent" directly, matching a real top border's weight; the title was already title_style("accent") (matching a Panel's title) and needed no change. The trailing ↑↓ clip arrows keep hint_style — they play the same role as a bordered panel's own muted "more" subtitle, not the border. No corner-glow analogue: that pass needs a truecolor blend PICOCALC's 16-slot palette can't render (effects=False), so the rule is uniformly bold rather than fading from a lit corner the way a real frame's top-left does. Co-Authored-By: Claude Sonnet 5 --- 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