mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-03 02:36:11 +00:00
refactor(ui): audit-pass fixes + dead-code/redundancy cleanup
Fixes from a full ui-new audit (OLED + e-ink both build green): - remove dead DisplayDriver::drawScrollArrows (all lists use drawScrollIndicator) - SettingsScreen selection bar -> lineStep()-1, matching the drawList screens - HomeScreen: don't force the 1s blink refresh on the CLOCK page (status icons are hidden there anyway) - FullscreenMsgView: clamp KEY_DOWN scroll to a cached _max_scroll instead of over-incrementing and leaning on the next render to clamp - DataStore: clamp use_lemon_font (>1 -> 0) on load, like the other enum fields - move the ~1.5KB wrap scratch (trans/lines) off the render stack into shared file-scope statics in FullscreenMsgView (single-threaded UI; the fullscreen view and history list never lay out in the same frame) Cleanup: - drop dead members RingtoneEditorScreen::DUR_VALS and HomeScreen::sensors_scroll - delete redundant manual scroll-clamps in handleInput across the drawList screens (drawList already reclamps each render); remove the now-unused _visible from QuickMsgScreen/NearbyScreen/BotScreen and BotScreen::scrollToSel() Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -413,7 +413,7 @@ class SettingsScreen : public UIScreen {
|
||||
bool collapsed = (_collapsed >> si) & 1;
|
||||
bool sel = (item == _selected);
|
||||
display.setColor(DisplayDriver::LIGHT);
|
||||
display.drawSelectionRow(0, y - 1, display.width() - _reserve, display.lineStep(), sel);
|
||||
display.drawSelectionRow(0, y - 1, display.width() - _reserve, display.lineStep() - 1, sel);
|
||||
display.setCursor(2, y);
|
||||
display.print(collapsed ? "+" : "-");
|
||||
display.print(" ");
|
||||
@@ -422,7 +422,7 @@ class SettingsScreen : public UIScreen {
|
||||
}
|
||||
|
||||
bool sel = (item == _selected);
|
||||
display.drawSelectionRow(0, y - 1, display.width() - _reserve, display.lineStep(), sel);
|
||||
display.drawSelectionRow(0, y - 1, display.width() - _reserve, display.lineStep() - 1, sel);
|
||||
|
||||
display.setCursor(2, y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user