Skip to content

feat: quick rotate option in epub reader menu#685

Merged
daveallie merged 7 commits intocrosspoint-reader:masterfrom
osteotek:feat-quick-rotate
Feb 5, 2026
Merged

feat: quick rotate option in epub reader menu#685
daveallie merged 7 commits intocrosspoint-reader:masterfrom
osteotek:feat-quick-rotate

Conversation

@osteotek
Copy link
Member

@osteotek osteotek commented Feb 3, 2026

Summary

  • adds rotation setting in epub reader menu, actual rotation happens on going back
  • improves button hint drawing to draw correctly in all orientations
image

AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? < PARTIALLY >

Copilot AI review requested due to automatic review settings February 3, 2026 15:31
@osteotek osteotek requested a review from a team February 3, 2026 15:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a quick rotation setting to the EPUB reader menu, allowing users to change reading orientation without leaving the reader. The orientation change is applied when exiting the menu to avoid disrupting navigation. Additionally, the PR improves button hint drawing across all orientations by introducing content gutters that prevent hints from overlapping with text and menu items.

Changes:

  • Added "Reading Orientation" menu item to EPUB reader menu with inline value display
  • Implemented orientation cycling logic that updates settings and triggers content reflow on menu exit
  • Enhanced button hint layout system with orientation-aware gutters for landscape and inverted portrait modes

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/activities/reader/EpubReaderMenuActivity.h Added ROTATE_SCREEN menu action, updated constructor to accept current orientation, added orientation tracking members
src/activities/reader/EpubReaderMenuActivity.cpp Implemented orientation cycling logic and gutter-aware rendering for menu items
src/activities/reader/EpubReaderActivity.h Added applyOrientation method signature
src/activities/reader/EpubReaderActivity.cpp Extracted orientation mapping logic, implemented applyOrientation method with position preservation
src/activities/reader/EpubReaderChapterSelectionActivity.cpp Added gutter-aware layout calculations to prevent hint overlap, fixed std::max usage
src/activities/reader/XtcReaderChapterSelectionActivity.cpp Added gutter-aware layout calculations to prevent hint overlap, removed workaround that hid hints in landscape mode

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@lukestein lukestein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on device and looks good to me. Works as expected with epub, including button tips in all orientations. No apparent effect (as expected) for txt or xtc. Thank you! 🎉

@osteotek
Copy link
Member Author

osteotek commented Feb 3, 2026

Tested on device and looks good to me. Works as expected with epub, including button tips in all orientations. No apparent effect (as expected) for txt or xtc. Thank you! 🎉

TXT doesn't have reader menu yet, when we add it, it would be easy to add it there too

@osteotek osteotek requested a review from a team February 3, 2026 16:22
@aaroncunliffe
Copy link
Contributor

The new menu option works great on EPUBs on device.

TXT files load with the new orientation as expected - as discussed above no reader menu for TXT currently.

Also good fix on the Reader Menu button hints in Landscape CW mode. During testing it looks like on master the hints overlap menu content, which I'm guessing is why this old line hides them on chapter select.

lukestein
lukestein previously approved these changes Feb 3, 2026
Copy link
Contributor

@lukestein lukestein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for my on-device testing (not code review, which I didn't)

Copy link
Member

@daveallie daveallie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@daveallie daveallie merged commit ee987f0 into crosspoint-reader:master Feb 5, 2026
1 check passed
jdk2pq added a commit to jdk2pq/crosspoint-reader that referenced this pull request Feb 5, 2026
* master:
  feat: add shift lock to KeyboardEntryActivity (crosspoint-reader#513)
  feat: rename and move in file manager (crosspoint-reader#630)
  feat: Implement fix for sunlight fading issue (crosspoint-reader#603)
  chore: Add PR title check on sync (crosspoint-reader#698)
  feat: Go To Position for epubs (crosspoint-reader#666)
  feat: Calibre Web Automated (CWA) koreader sync server support (crosspoint-reader#594)
  chore: Add CI check job to consolidate status (crosspoint-reader#696)
  chore: CI Build Summary - firmware stats, firmware artifact (crosspoint-reader#601)
  feat: quick rotate option in epub reader menu (crosspoint-reader#685)
  feat(settings): add "Cover + Custom" sleep screen mode (crosspoint-reader#582)
  fix: Artifacts on Thumb on Home Screen (crosspoint-reader#662)
  feat: holding back button while booting, boots to home screen as a mean of escaping boot loop (crosspoint-reader#587)
  docs: Add small SCOPE.md and GOVERNANCE.md documents (crosspoint-reader#640)
  feat: front button remapper (crosspoint-reader#664)
  feat: UI themes, Lyra (crosspoint-reader#528)
  feat: Add CSS parsing and CSS support in EPUBs (crosspoint-reader#411)
  fix: move http upload state to heap (crosspoint-reader#657)
Unintendedsideeffects pushed a commit to Unintendedsideeffects/crosspoint-reader that referenced this pull request Feb 17, 2026
## Summary

* adds rotation setting in epub reader menu, actual rotation happens on
going back
* improves button hint drawing to draw correctly in all orientations

<img width="860" height="1147" alt="image"
src="https://github.com/user-attachments/assets/91ceeca6-729f-4304-b68a-e412f6e2c9a7"
/>


---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? _**< PARTIALLY  >**_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants