fix(ui): gap below header separator, one method everywhere

Content drawn under the title separator touched the line on every standard
screen, because listStart() == headerH() (the row right after the separator).
Graphical screens worked around it with a hand-rolled hdr+2.

Bake a 2px breathing gap into listStart() so every list gains it at once, and
switch the screens that hand-rolled the offset (Compass, Nav, Nearby detail) to
listStart() so the content top is computed the same way everywhere.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-06-17 21:35:51 +02:00
parent e5ff2de3e4
commit 2136e959d4
4 changed files with 8 additions and 6 deletions

View File

@@ -39,7 +39,10 @@ public:
// Use these instead of hardcoded pixel values so layouts adapt to any display.
int lineStep() const { return getLineHeight() + 2; } // row pitch: text + gap
int headerH() const { return getLineHeight() + 3; } // title bar height
int listStart() const { return headerH(); } // y where list items begin
// y where list items begin: a 2px breathing gap below the header separator so
// the first row doesn't touch the line (matches the hand-rolled hdr+2 used by
// the graphical screens).
int listStart() const { return headerH() + 2; }
int listVisible(int itemH) const { return (height() - listStart()) / itemH; }
int listVisible() const { return listVisible(lineStep()); }
// x where a right-side value column starts (leaves ~8 chars for the value)