feat(ui): proportional scrollbar with mini-icon caps; reclaim row space

Replace the text ^/v scroll arrows with a font-scaling indicator drawn in
icons.h: a proportional thumb between fixed up/down triangle mini-icon caps.
drawScrollIndicator() lives in a ~5px right-edge column and scales via
miniIconScale (1x OLED, 2x landscape e-ink).

- Mini-icons: ICON_SCROLL_UP/DOWN; miniIconDrawTop (exact placement) and
  miniIconDrawHalo (shape-hugging 1px DARK halo, clip_top to spare the header
  separator) so caps stay visible on the LIGHT selection bar without a box.
- Thumb is 3*s wide so it centres on the triangle column; caps are static end
  markers (always drawn) so neither vanishes at the extremes.
- scrollIndicatorReserve(): right-edge gutter (0 when the list fits). Content,
  the selection bar and the message-history bubbles are all narrowed by it so
  nothing renders under the scrollbar. Portrait e-ink wrap width subtracts the
  reserve in both the box-height pass and render so wrapped text can't spill.
- Drop the redundant ">" selection marker (the highlight bar already shows
  selection) and shift rows to x=2, reclaiming left-edge space.
- Wire the indicator into every scrollable list (Bot, Settings, Nearby, Tools,
  Trail, QuickMsg lists + DM/channel history) and add one to WaypointsView,
  which scrolled with no indicator before.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
MarekZegare4
2026-06-15 14:41:46 +02:00
co-authored by Claude Opus 4.8
parent 8bd6fbf1cb
commit 6e4177f3d6
8 changed files with 177 additions and 87 deletions
@@ -588,13 +588,14 @@ public:
display.drawTextCentered(display.width() / 2, display.height() / 2 + display.lineStep() / 2, hint);
}
} else {
int reserve = scrollIndicatorReserve(display, _count, _visible);
for (int i = 0; i < _visible && (_scroll + i) < _count; i++) {
int idx = _scroll + i;
bool sel = (idx == _sel);
int y = start_y + i * item_h;
const Entry& e = _entries[idx];
display.drawSelectionRow(0, y - 1, display.width(), item_h - 1, sel);
display.drawSelectionRow(0, y - 1, display.width() - reserve, item_h - 1, sel);
char filt[32];
display.translateUTF8ToBlocks(filt, e.name, sizeof(filt));
@@ -620,12 +621,11 @@ public:
if (e.dist_km >= 0.0f) geo::fmtDist(right, sizeof(right), e.dist_km, useImperial());
else strncpy(right, "?GPS", sizeof(right));
}
display.setCursor(display.width() - display.getTextWidth(right) - 2, y);
display.setCursor(display.width() - display.getTextWidth(right) - 2 - reserve, y);
display.print(right);
}
display.drawScrollArrows(start_y, start_y + (_visible - 1) * item_h,
_scroll > 0, _scroll + _visible < _count);
drawScrollIndicator(display, start_y, _visible * item_h, _count, _visible, _scroll);
}
if (renderActivePopup(display)) return 50;