Files
crosspoint-reader-mod/chat-summaries/2026-02-17_home-highlight-fixes.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

1.7 KiB

Home Screen Book Card Highlight Fixes

Task

Fix visual issues with the selection highlight on home screen recent book cards:

  1. Bottom padding too tight against author text descenders
  2. Rounded corners not uniform across all four corners

Changes Made

LyraTheme.h

  • Increased homeCoverTileHeight from 310 to 318 to provide bottom padding below author text

LyraTheme.cpp

  • Reduced cornerRadius from 6 to 4 to prevent radius clamping in the 8px-tall top strip (which was clamping min(6, w/2, 4) = 4 while the bottom section used the full 6)

GfxRenderer.cpp

  • No net changes. Two approaches were tried and reverted:
    1. Dither origin (global shift): misaligned the highlight's dot pattern with surrounding UI
    2. 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 maxRadius through fillRoundedRect'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 fillArc is the least-bad option — the minor L/R asymmetry at radius 4 is much less noticeable than seam artifacts.