feat: add live font preview pane to font selection screen (#2349)
## Summary * Adds a live font preview pane to the font selection screen so users can see how a font looks before committing to it. * Changes * A preview pane occupying the top 30% of the font selection screen, rendering sample pangram text in the previewed font * A two-step confirm flow: first press (enter button) previews the font, second press selects it * Back restores the original font settings, so browsing has no side effects * Layout dimensions cached in `onEnter()` to avoid redundant recalculation between `loop()` and `render()` ## Additional Context * Preview sample text is hardcoded English; didn't want to use AI for translation as I would not be able to verify the output in most languages... * The preview pane reduces visible list height; this is compensated by passing the reserved height into `getNumberOfItemsPerPage` --- ### AI Usage Did you use AI tools to help write this code? **PARTIALLY** AI use for assisting in coding and in writing the PR description.
This commit is contained in:
@@ -77,6 +77,7 @@ STR_LONG_PRESS_BEHAVIOR: "Press. lunga pul. laterali"
|
||||
STR_LONG_PRESS_BEHAVIOR_OFF: "OFF"
|
||||
STR_LONG_PRESS_BEHAVIOR_SKIP: "Salta capitolo"
|
||||
STR_LONG_PRESS_BEHAVIOR_ORIENTATION: "Orientamento"
|
||||
STR_FONT_PREVIEW_TEXT: "Pranzo d'acqua fa volti sghembi"
|
||||
STR_FONT_FAMILY: "Font lettore"
|
||||
STR_FONT_SIZE: "Dimensione font"
|
||||
STR_LINE_SPACING: "Interlinea lettore"
|
||||
@@ -375,4 +376,4 @@ STR_CLOCK_SYNC_NO_WIFI: "Wi-Fi non connesso"
|
||||
STR_HOLD_CONFIRM_TO_DELETE: "Tieni premuto Conferma per cancellare"
|
||||
STR_NEXT_FIELD: "Succ."
|
||||
STR_CURRENT_TIME: "Ora attuale: "
|
||||
STR_DISABLED: "Disattivato"
|
||||
STR_DISABLED: "Disattivato"
|
||||
|
||||
Reference in New Issue
Block a user