mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
Portrait e-ink message history had two scrollbar glitches: - Track length tracked the last visible box's bottom, so a long message at the bottom that left empty space shrank the whole bar. Pin the track to the full list area (hist_start_y..cby); only the thumb sizes/moves. - Thumb size was derived from the per-frame visible-box count, which fluctuates with variable-height boxes. Drive it off pixel sums with a constant viewport (view_px = track_h) so the thumb stays stable while scrolling one list. - Gutter reserve used last frame's _hist_visible, so an incoming message briefly toggled the gutter and reflowed box widths. Decide it from a whole-list fit test at the widest layout instead — stable, no flicker. Unify both fixes in computeHistScroll() (shared by DM + channel views) and split drawScrollIndicator into a pixel core (drawScrollIndicatorPx) + an item-count wrapper. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>