mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
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:
@@ -412,9 +412,7 @@ private:
|
||||
display.print(buf);
|
||||
}
|
||||
|
||||
display.drawScrollArrows(y0, y0 + (visible - 1) * step,
|
||||
_summary_scroll > 0,
|
||||
_summary_scroll + visible < SUMMARY_ITEM_COUNT);
|
||||
drawScrollIndicator(display, y0, visible * step, SUMMARY_ITEM_COUNT, visible, _summary_scroll);
|
||||
}
|
||||
|
||||
void renderList(DisplayDriver& display) {
|
||||
@@ -466,8 +464,7 @@ private:
|
||||
display.print(row);
|
||||
}
|
||||
|
||||
display.drawScrollArrows(top, top + (visible - 1) * step,
|
||||
_list_scroll > 0, _list_scroll + visible < total);
|
||||
drawScrollIndicator(display, top, visible * step, total, visible, _list_scroll);
|
||||
}
|
||||
|
||||
// Shared map projection: geographic (1e-6 deg) → screen pixels. The scale is
|
||||
|
||||
Reference in New Issue
Block a user