Files
crosspoint-reader-mod/chat-summaries/2026-02-17_home-highlight-fixes.md

25 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

# 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.