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.4 KiB
1.4 KiB
Fix Text Wrapping and Spacing for Expanded Selected Row
Task
Improve the expandable selected row feature (from PR #1019 enhancement). Two issues were identified from device testing:
- Character-level wrapping broke words mid-character (e.g., "Preside / nt"), resulting in unnatural line breaks.
- Poor vertical spacing -- text lines clustered near the top of the expanded highlight area with large empty space at the bottom.
Changes Made
src/components/themes/BaseTheme.cpp
- Rewrote
wrapTextToLineswith 3-tier break logic:- Preferred delimiters: " -- ", " - ", en-dash, em-dash (breaks at last occurrence to maximize line 1)
- Word boundaries: last space or hyphen that fits
- Character-level fallback for long unbroken tokens
- Extracted
truncateWithEllipsishelper to reduce duplication - Fixed expanded row rendering: text lines vertically centered in 2x row height area, extension baseline-aligned with last text line
src/components/themes/lyra/LyraTheme.cpp
- Same
wrapTextToLinesrewrite andtruncateWithEllipsishelper - Same vertical centering for expanded row text lines
- Icon also vertically centered in expanded area
- Extension baseline-aligned with last text line instead of fixed offset
mod/prs/MERGED.md
- Updated PR #1019 mod enhancement section to reflect the new wrapping strategy and spacing improvements
Follow-up Items
- Device testing to verify improved wrapping and spacing visually