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
1.7 KiB
1.7 KiB
Home Screen Book Card Highlight Fixes
Task
Fix visual issues with the selection highlight on home screen recent book cards:
- Bottom padding too tight against author text descenders
- Rounded corners not uniform across all four corners
Changes Made
LyraTheme.h
- Increased
homeCoverTileHeightfrom 310 to 318 to provide bottom padding below author text
LyraTheme.cpp
- Reduced
cornerRadiusfrom 6 to 4 to prevent radius clamping in the 8px-tall top strip (which was clampingmin(6, w/2, 4) = 4while the bottom section used the full 6)
GfxRenderer.cpp
- No net changes. Two approaches were tried and reverted:
- Dither origin (global shift): misaligned the highlight's dot pattern with surrounding UI
- Arc-relative dither (per-corner relative coords): created visible seam artifacts at 3 of 4 corners where the arc's relative dither met the adjacent rectangle's absolute dither with inverted parity
Key Decisions
- Bottom padding: Originally tried shrinking the highlight (subtracting extra padding from bottom section height), but this cut off the author text. Correct approach: increase the tile height so the highlight naturally has more room.
- Corner radius: Reducing from 6 to 4 ensures all corners (both the thin top strip and taller bottom section) use the same
maxRadiusthroughfillRoundedRect's clamping formula. - Dither approaches (both reverted): Two dither fixes were tried: (1) global dither origin shift misaligned with surrounding UI, (2) arc-relative dither created visible seam artifacts at corners where parity mismatched. The absolute dither pattern in
fillArcis the least-bad option — the minor L/R asymmetry at radius 4 is much less noticeable than seam artifacts.