Repository navigation
Conversation
- Cover grid now uses 2 columns in landscape instead of 3 - Button hints drawn on side edge in landscape mode with rotated labels - BaseTheme and LyraTheme both get landscape-aware button hints - X4 physical buttons map to side edge when rotated to landscape
- Landscape mode draws button hints on the side edge - Two groups of 2 buttons each positioned vertically on the side - Text drawn with rotation to match landscape orientation
Firmware buildsAutomatically generated from the merge build for the latest commit of this PR ( Download and extract the Firmware unavailable: Sticky, X4 Pro, X4 Classic, Paper Mono, MetalIO EInk4, EEGO A4, BOOX Picco. Flash and static RAM usage (bytes)Merge build for PR
X3 / X4: baseline unavailable — no saved develop build. Sticky: baseline unavailable — no saved develop build. Sticky: PR usage unavailable — measurement missing (build may have failed). X4 Pro: baseline unavailable — no saved develop build. X4 Pro: PR usage unavailable — measurement missing (build may have failed). X4 Classic: baseline unavailable — no saved develop build. X4 Classic: PR usage unavailable — measurement missing (build may have failed). Paper Mono: baseline unavailable — no saved develop build. Paper Mono: PR usage unavailable — measurement missing (build may have failed). MetalIO EInk4: baseline unavailable — no saved develop build. MetalIO EInk4: PR usage unavailable — measurement missing (build may have failed). EEGO A4: baseline unavailable — no saved develop build. EEGO A4: PR usage unavailable — measurement missing (build may have failed). BOOX Picco: baseline unavailable — no saved develop build. BOOX Picco: PR usage unavailable — measurement missing (build may have failed). |
The X4 reports 480x800 physical dimensions regardless of how it is held, so the home screen always assumed portrait. Apply SETTINGS.orientation on home screen enter (like the reader does) and use renderer orientation instead of physical dimensions to detect landscape mode.
Remove Classic, RoundedRaff, Lyra 3 Covers and the Cover Grid home variant so the firmware carries only the Lyra theme. UITheme now always builds LyraTheme (BaseTheme remains the OOM fallback), the UI Theme setting and its translations are gone, and saved settings files keep loading (the legacy uiTheme key is simply ignored). HomeActivity loses the cover-grid path; the text-settings host test runs Lyra metrics only.
The landscape hint rail drew the portrait band and the side rail on top of each other, and reused portrait x spacing for boxes that are tall there, so the boxes overlapped. Draw only the rail in landscape, mirror the portrait band's panel footprint so each box sits over its physical button in both rotations, key the position table to the portrait panel width, and center rotated labels accounting for their text running toward smaller y.
Fold the hint-rail gutter into the fui device safe area (UiAppHost now derives the device context through railSafeDeviceContext), so lists, tabs, popups and sheets stop short of the rail in landscape instead of drawing under it. Replace the hardcoded portrait bottom hint margins with UITheme::getHintBandBottomInset, and add getHintRailLeftGutter / getHintRailRightGutter for chrome pinned to a screen edge (library readout and hold help, keyboard entry, dictionary, bookmarks, remap warning banner). Portrait values are unchanged.
UITheme::getHint* helpers are static members, so they must go through getInstance().getMetrics(); drop the now-unused metrics locals in LibraryListActivity that cppcheck flagged.
The bare pioarduino release URL in platform_packages makes fresh dependency resolution look for a package named 'registry' and fail (UnknownPackageError); the same scons 4.8.1 package (4.40801.0) is published on the official PlatformIO registry, so reference it by package name. Bump both PlatformIO cache keys so stale resolutions do not mask the fix.
The battery and clock hug the header corners, which land behind the button-hint rail in landscape. DrawHeader and the catalog header now withhold that chrome from the fui header and draw the battery, percent label and clock as one centered group on the status strip instead.
HeaderChrome.h needed clang-format-21 (the -g wrapper only formats tracked-modified files, and the header was already committed). In the catalog header, initialize centeredChrome from header.status so it is used and not flagged as a dead assignment.
List screens scrolled without any progress indication. UiListActivity now draws a small "position/count" (like 12/69) at the bottom-right of the folded content on every list screen: position over pages, since rows-per-page varies with label wrapping and a page total would change while scrolling (same rationale as the library's existing readout). syncListViewport reserves the line, anchored to the content fold so takeBottom chrome like the bookmarks help line stacks cleanly, and the fui safe area keeps it clear of the bezel and the landscape hint rail. Opt-outs: library (own readout), OPDS browser and plugin catalog (their own page pagers), status-bar settings and text settings (short fixed lists, the latter under a live preview and layout test).
AP mode stacked two 198px QR codes plus labels, taller than the 480px landscape view. They now sit side by side with their labels under each code when the content band fits both. Raw-drawn chrome (QR band, centered text, wifi bars) respects the landscape rail gutter, matching the FUI screens. Portrait layout unchanged.
GUI is the theme object; UITheme::drawCenteredText is a singleton static, so GUI.drawCenteredText does not compile.
The home screen stacked the cover tile over the menu, which runs off the 480px landscape view. Cover card and menu now share the rail-safe band side by side in landscape; portrait keeps the original rects and formulas untouched. Cover/menu rects come from one homeContentLayout() used by both render and the touch routing in loop(), so hit bands stay on the visuals on touch boards (X4 has none, but the grid is kept correct). The cover snapshot rect follows the layout automatically.
Summary
Full horizontal (landscape) UI support across the CrossPoint Reader firmware.
Changes
Cover Grid (2 columns in landscape)
CoverGridHomeUi::gridColumnsFor()returns 2 columns in landscape, 3 in portraitButton Hints (landscape-aware)
All three themes draw button hints on the side edge in landscape mode:
Labels drawn with
drawTextRotated90CW(). CW orientation draws on the left edge, CCW on the right.Status Bar & Header
Already orientation-aware via
getOrientedViewableTRBL()— no changes needed, full-width centered in landscape automatically.Cover Cache
Already tracks orientation and invalidates on rotation — no changes needed.