mod: overhaul reader menu with long-press actions and quick toggles

Consolidate dictionary items: remove "Lookup Word History" and
"Delete Dictionary Cache" from the menu. Long-press on "Lookup Word"
opens history; delete-dict-cache is now a sentinel entry at the bottom
of the history list.

Replace "Reading Orientation" with "Toggle Portrait/Landscape" that
toggles between two configurable preferred orientations (new settings:
Preferred Portrait, Preferred Landscape). Long-press opens a manual
4-option orientation sub-menu.

Add "Toggle Font Size" menu item that cycles through font sizes and
applies on menu exit (with section re-layout).

Rename "Letterbox Fill" to "Override Letterbox Fill" and
"Sync Progress" to "Sync Reading Progress" in reader menu.

All long-press flows use ignoreNextConfirmRelease to prevent the
button release from triggering actions on the subsequent screen.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cottongin
2026-02-16 18:45:46 -05:00
parent 61fb11cae3
commit 1d7971ae60
11 changed files with 248 additions and 48 deletions

View File

@@ -135,7 +135,9 @@ uint8_t CrossPointSettings::writeSettings(FsFile& file, bool count_only) const {
writer.writeItem(file, fadingFix);
writer.writeItem(file, embeddedStyle);
writer.writeItem(file, sleepScreenLetterboxFill);
// New fields need to be added at end for backward compatibility
// New fields added at end for backward compatibility
writer.writeItem(file, preferredPortrait);
writer.writeItem(file, preferredLandscape);
return writer.item_count;
}
@@ -267,6 +269,10 @@ bool CrossPointSettings::loadFromFile() {
{ uint8_t _ignore; serialization::readPod(inputFile, _ignore); } // legacy: sleepScreenGradientDir
if (++settingsRead >= fileSettingsCount) break;
// New fields added at end for backward compatibility
readAndValidate(inputFile, preferredPortrait, ORIENTATION_COUNT);
if (++settingsRead >= fileSettingsCount) break;
readAndValidate(inputFile, preferredLandscape, ORIENTATION_COUNT);
if (++settingsRead >= fileSettingsCount) break;
} while (false);
if (frontButtonMappingRead) {