feat: quick rotate option in epub reader menu#685
feat: quick rotate option in epub reader menu#685daveallie merged 7 commits intocrosspoint-reader:masterfrom
Conversation
There was a problem hiding this comment.
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.
lukestein
left a comment
There was a problem hiding this comment.
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 |
|
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 |
lukestein
left a comment
There was a problem hiding this comment.
Approved for my on-device testing (not code review, which I didn't)
* 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)
## 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 >**_
Summary
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 >