PR #1311: Replace separate spaceWidth + getSpaceKernAdjust() with a single getSpaceAdvance() that combines space glyph advance and kerning in fixed-point before snapping to pixels, eliminating +/-1 px rounding drift in text layout. PR #1322: Add early exit to fillUncompressedSizes() once all target entries are matched, avoiding unnecessary central directory traversal. Also updates tracking docs and verifies PR #1329 (reader utils refactor) matches upstream after merge. Made-with: Cursor
This commit is contained in:
28
chat-summaries/2026-03-08_14-00-summary.md
Normal file
28
chat-summaries/2026-03-08_14-00-summary.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Restore Preferred Orientation Settings and Long-Press Sub-Menu
|
||||
|
||||
**Date**: 2026-03-08
|
||||
**Branch**: mod/master
|
||||
**Commit**: 0d8a3fd
|
||||
|
||||
## Task
|
||||
|
||||
Restore two orientation preference features lost during the upstream PR resync:
|
||||
1. Settings UI entries for preferred portrait/landscape modes
|
||||
2. Long-press sub-menu on the reader menu's orientation toggle
|
||||
|
||||
## Changes
|
||||
|
||||
### Settings UI and Persistence
|
||||
- **`src/SettingsList.h`**: Added `DynamicEnum` entries for `preferredPortrait` (Portrait/Inverted) and `preferredLandscape` (Landscape CW/Landscape CCW) in the Reader settings category. Uses getter/setter lambdas to map between sequential indices and non-sequential orientation enum values.
|
||||
- **`src/JsonSettingsIO.cpp`**: Added manual JSON save/load for both fields with validation (rejects invalid orientation values, falls back to defaults).
|
||||
|
||||
### Long-Press Orientation Sub-Menu
|
||||
- **`src/activities/reader/EpubReaderMenuActivity.h`**: Added `orientationSubMenuOpen`, `orientationSubMenuIndex`, and `ignoreNextConfirmRelease` state flags.
|
||||
- **`src/activities/reader/EpubReaderMenuActivity.cpp`**:
|
||||
- `loop()`: Long-press (700ms) on Confirm when the orientation item is selected opens the sub-menu. Sub-menu handles its own Up/Down/Confirm/Back input. Added `ignoreNextConfirmRelease` guard to prevent the long-press release from immediately selecting.
|
||||
- `render()`: When sub-menu is open, renders a centered list of all 4 orientations with the current one marked with `*`. Uses the same gutter/hint layout as the main menu.
|
||||
|
||||
## Follow-up
|
||||
|
||||
- Hardware testing needed for both features
|
||||
- Translations for `STR_PREFERRED_PORTRAIT` and `STR_PREFERRED_LANDSCAPE` only exist in English; other languages fall back automatically
|
||||
Reference in New Issue
Block a user