mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-31 09:18:12 +00:00
fix: e-ink portrait/landscape layout — separators, battery, keyboard, screens
- DisplayDriver: add sepH() (2px landscape, 1px OLED); fix transliterateCodepoint fallback '?' (was '\xDB' which broke UTF-8 word-wrap and rendered tiny block char) - GxEPDDisplay: drawRect draws double border on landscape for visible 2px weight - UITask: navigation dots scale with lh; content_y saves 16px by using dots_y+6; battery iconW=lh*2, fill margin bm scales with orientation; indicator spacing fixed; clock separator uses sepH(); alert popup tight and vertically centred - KeyboardWidget: compact cell height (no stretch), multi-line preview, cursor always on last visible line - BotScreen / NearbyScreen detail: use lineStep() as natural item height, shrink only when items don't fit (fixes portrait stretch) - QuickMsgScreen: send button pinned to display bottom (height-lh-2), not floating - SettingsScreen: AUTO_OFF guarded with #if AUTO_OFF_MILLIS>0; default sel=AUTO_LOCK - All screens: separators updated to sepH() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
118f29b0a1
commit
9c671891d9
@@ -41,6 +41,8 @@ public:
|
||||
int listVisible() const { return listVisible(lineStep()); }
|
||||
// x where a right-side value column starts (leaves ~8 chars for the value)
|
||||
int valCol() const { return width() - getCharWidth() * 8; }
|
||||
// separator line thickness: 2px on landscape e-ink, 1px on OLED
|
||||
int sepH() const { return (width() >= height()) ? 2 : 1; }
|
||||
virtual void drawTextCentered(int mid_x, int y, const char* str) { // helper method (override to optimise)
|
||||
int w = getTextWidth(str);
|
||||
setCursor(mid_x - w/2, y);
|
||||
@@ -135,7 +137,7 @@ public:
|
||||
case 0x00E7: return 'c'; case 0x00C7: return 'C'; // ç Ç
|
||||
case 0x00F1: return 'n'; case 0x00D1: return 'N'; // ñ Ñ
|
||||
case 0x00FD: return 'y'; case 0x00DD: return 'Y'; // ý Ý
|
||||
default: return '\xDB'; // CP437 full block █
|
||||
default: return '?';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -139,6 +139,8 @@ void GxEPDDisplay::drawRect(int x, int y, int w, int h) {
|
||||
display_crc.update<int>(w);
|
||||
display_crc.update<int>(h);
|
||||
display.drawRect(x, y, w, h, _curr_color);
|
||||
if (width() >= height() && w > 2 && h > 2)
|
||||
display.drawRect(x + 1, y + 1, w - 2, h - 2, _curr_color);
|
||||
}
|
||||
|
||||
void GxEPDDisplay::drawXbm(int x, int y, const uint8_t* bits, int w, int h) {
|
||||
|
||||
Reference in New Issue
Block a user