Files
crosspoint-reader-mod/chat-summaries/2026-03-09_05-00-summary.md
cottongin 4851016c47 fix: adjust BookInfo landscape layout for side button hint gutters
In landscape CW/CCW the physical buttons are on the left/right side,
not the bottom. Reserve a horizontal gutter (sideButtonHintsWidth)
on the appropriate side and remove the bottom buttonHintsHeight
padding, following the established pattern from other activities.

Made-with: Cursor
2026-03-09 04:28:26 -04:00

1.8 KiB

BookInfo: Landscape Button Hint Gutter Fix

Date: 2026-03-09 Task: Adjust BookInfo's content area and header placement in landscape orientations to account for button hints appearing on a side instead of the bottom.

Problem

In landscape orientations the physical front buttons end up on a side of the screen (CW = left, CCW = right). BookInfo was reserving buttonHintsHeight at the bottom in all orientations, wasting vertical space in landscape and not accounting for the side gutter needed to avoid overlapping the side-drawn button hints.

Changes Made

src/activities/home/BookInfoActivity.cpp

  • buildLayout(): Added hintGutterWidth computation (metrics.sideButtonHintsWidth in landscape, 0 in portrait). Text wrapping width (contentW) now subtracts hintGutterWidth. Bottom padding for contentHeight uses only verticalSpacing in landscape (no buttonHintsHeight since there are no bottom hints).
  • render(): Added isLandscapeCw, hintGutterWidth, and contentX computations following the established codebase pattern. In CW, contentX = hintGutterWidth shifts all content right (hints on left). In CCW, contentX = 0 and content width is reduced (hints on right). Cover X position offset by contentX. Field X offset by contentX. contentBottom no longer subtracts buttonHintsHeight in landscape. Header fillRect and drawHeader Rect both adjusted by contentX and hintGutterWidth.

Pattern Followed

The established pattern from LookedUpWordsActivity, DictionarySuggestionsActivity, EpubReaderMenuActivity, and others:

const int hintGutterWidth = isLandscape ? metrics.sideButtonHintsWidth : 0;
const int contentX = isLandscapeCw ? hintGutterWidth : 0;

Follow-up

Ready for hardware testing in all 4 orientations.