mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-06 20:26:12 +00:00
fix: landscape e-ink layout corrections — clock overlap, keyboard overflow, bar sizing, nearby detail
- GxEPDDisplay: fontAscender only applies to sz=1 with Lemon; sz=2 (NULL font) was incorrectly getting a 16px cursor offset, causing clock text to render 16px lower than expected and overlap the date line - KeyboardWidget: compute cell_h from available screen height instead of lh+1; tighten sep_y to lh so the grid fits within 122px even with Lemon font (lh=20) - SettingsScreen renderBar: constrain box size to available width so the 5th buzzer-volume square doesn't overflow past the right edge with Lemon font - NearbyScreen discover detail: manually truncate b64 public key by charWidth to guarantee one-line rendering; use dynamic step = (height-hdr)/5 so Status line doesn't fall off the bottom of the screen - NearbyScreen contacts detail: merge dist+az into one line and use dynamic step to fit 5 lines within the display; removes the off-screen Seen: row - AutoAdvertScreen: replace lineStep() gap before hints with 4px fixed gap so both hint lines fit within the display with large fonts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
1d8ca25469
commit
118f29b0a1
@@ -87,9 +87,12 @@ class SettingsScreen : public UIScreen {
|
||||
}
|
||||
|
||||
void renderBar(DisplayDriver& display, int x, int y, int value, int max_val) {
|
||||
const int box_h = display.getLineHeight() - 2;
|
||||
const int box_w = box_h;
|
||||
const int gap = 2;
|
||||
const int gap = 2;
|
||||
const int avail = display.width() - x;
|
||||
const int raw = (avail - (max_val - 1) * gap) / max_val;
|
||||
const int cap = display.getLineHeight() - 2;
|
||||
const int box_h = raw < cap ? (raw < 2 ? 2 : raw) : cap;
|
||||
const int box_w = box_h;
|
||||
for (int i = 0; i < max_val; i++) {
|
||||
int bx = x + i * (box_w + gap);
|
||||
display.drawRect(bx, y, box_w, box_h);
|
||||
|
||||
Reference in New Issue
Block a user