# Placeholder Cover Visual Refinements & Home Screen Integration ## Task Refined the placeholder cover layout to match a mockup, and integrated placeholder generation into the home screen's thumbnail loading. ## Changes Made ### Layout Refinements (`PlaceholderCoverGenerator.cpp`, `preview_placeholder_cover.py`) - **Icon position**: Moved from above-title to side-by-side (icon left, title right) - **Author scale**: Increased from 1x to 2x on full-size covers for larger author text - **Line spacing**: Reduced to 75% of advanceY so 2-3 title lines fit within icon height - **Vertical centering**: Title text centers against icon when 1-2 lines; top-aligns with overflow for 3+ lines. Uses `ascender`-based visual height instead of `advanceY`-based for accurate centering - **Horizontal centering**: The icon+gap+text block is now centered as a unit based on actual rendered text width, not the full available text area ### Home Screen Integration (`HomeActivity.cpp`) - Added `PlaceholderCoverGenerator` fallback in `loadRecentCovers()` — when format-specific `generateThumbBmp()` fails (or for TXT which had no handler), a placeholder thumbnail is generated instead of clearing `coverBmpPath` and showing a blank rectangle - This covers the case where a book was previously opened, cache was cleared, and the home screen needs to regenerate thumbnails ## Files Changed - `lib/PlaceholderCover/PlaceholderCoverGenerator.cpp` — layout logic updates - `scripts/preview_placeholder_cover.py` — matching preview updates - `src/activities/home/HomeActivity.cpp` — placeholder fallback in loadRecentCovers ## Commit `632b76c` on `mod/generate-placeholder-covers` ## Follow-up Items - Test on actual device to verify C++ bitmap font rendering matches preview expectations - The preview script uses Helvetica (different metrics than ubuntu_12_bold), so on-device appearance will differ slightly from previews