Files
crosspoint-reader-mod/chat-summaries/2026-02-15_00-15-summary.md
cottongin dfbc931c14 mod: Phase 1 - bring forward mod-exclusive files with ActivityManager migration
Brings ~55 mod-exclusive files to the upstream-based mod/master-resync branch:

Activities (migrated to new ActivityManager pattern):
- Clock/Time: SetTimeActivity, SetTimezoneOffsetActivity, NtpSyncActivity
- Dictionary: DictionaryDefinitionActivity, DictionarySuggestionsActivity,
  DictionaryWordSelectActivity, LookedUpWordsActivity
- Bookmark: EpubReaderBookmarkSelectionActivity
- Book management: BookManageMenuActivity, EndOfBookMenuActivity
- OPDS: OpdsServerListActivity, OpdsSettingsActivity
- Utility: DirectoryPickerActivity, NumericStepperActivity

Utilities (unchanged):
- BookManager, BookSettings, BookmarkStore, BootNtpSync
- Dictionary, LookupHistory, TimeSync, OpdsServerStore

Libraries: PlaceholderCover, TableData, ChapterXPathIndexer
Scripts: inject_mod_version, generate_book_icon, preview_placeholder_cover
Docs: KOReader sync XPath mapping

Migration changes:
- ActivityWithSubactivity -> Activity base class
- Callback constructors -> finish()/setResult() pattern
- enterNewActivity() -> startActivityForResult()
- Activity::RenderLock&& -> RenderLock&&

These files won't compile yet - they reference mod settings and I18n
strings that will be added in subsequent phases.

Made-with: Cursor
2026-03-07 15:10:00 -05:00

30 lines
1.9 KiB
Markdown

# 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