mod: Phase 2c-e — GfxRenderer, themes, SleepActivity, SettingsActivity, platformio

- Add drawPixelGray to GfxRenderer for letterbox fill rendering
- Add PRERENDER_THUMB_HEIGHTS to UITheme for placeholder cover generation
- Add [env:mod] build environment to platformio.ini
- Implement sleep screen letterbox fill (solid/dithered) with edge
  caching in SleepActivity, including placeholder cover fallback
- Add Clock settings category to SettingsActivity with timezone,
  NTP sync, and set-time actions; replace CalibreSettings with
  OpdsServerListActivity; add DynamicEnum rendering support
- Add long-press book management to RecentBooksActivity

Made-with: Cursor
This commit is contained in:
cottongin
2026-03-07 15:52:46 -05:00
parent d1ee45592e
commit 30473c27d3
10 changed files with 485 additions and 30 deletions

View File

@@ -180,6 +180,16 @@ void GfxRenderer::drawPixel(const int x, const int y, const bool state) const {
}
}
void GfxRenderer::drawPixelGray(const int x, const int y, const uint8_t val2bit) const {
if (renderMode == BW && val2bit < 3) {
drawPixel(x, y);
} else if (renderMode == GRAYSCALE_MSB && (val2bit == 1 || val2bit == 2)) {
drawPixel(x, y, false);
} else if (renderMode == GRAYSCALE_LSB && val2bit == 1) {
drawPixel(x, y, false);
}
}
int GfxRenderer::getTextWidth(const int fontId, const char* text, const EpdFontFamily::Style style) const {
const auto fontIt = fontMap.find(fontId);
if (fontIt == fontMap.end()) {