mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-29 00:08:12 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user