Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement vertical page panning in paged reader mode when using hardware keys #716

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adrian-fleiszer
Copy link

TLDR; With this change, if the page doesn't fit vertically on the screen, when the user presses "down" the page will be panned down first and then after hitting the bottom, switched to the next page. So it makes vertical panning consistent with horizontal panning of wide images.

My use case is that I'm running Komikku on an Android tablet that has an unusual screen aspect ratio (it's a 7,8 inch
1872x1404 e-ink screen) and when the "Scale type" is set to "Smart fit" the pages fill the screen horizontally but they usually don't fit vertically. As a result, when reading manga I have to first switch to a new page and then scroll down to see the bottom of the page. This is fine when handholding the device but is impossible to do when navigating pages with volume keys or a Bluetooth controller. When looking for a fix for this I found in the source code that the moveDown() function doesn't really move the page down but just switches to the next page. But the moveRight() and moveLeft() are implemented correctly with panning first and so I decided that implementing moveDown() and moveUp() with panning will solve my problems.

I tested this change with an emulator that has the specs of my device and it works perfectly as I wanted and it doesn't appear to be breaking anything else.

While this change solves my very narrow use case I still think that making the panning behavior consistent in both axes is logical and beneficial for all users.

Please let me know if I missed anything that is needed for merging PRs from outside contributors

…are keys

* Pan to top or bottom of the page instead of directly moving to the previous/next page.
* Add `canPanUp`, `canPanDown`, `panUp`, `panDown` to `ReaderPageImageView`.
* Modify `moveUp` and `moveDown` in `PagerViewer` to utilize the new panning functions.
@cuong-tran
Copy link
Collaborator

sound nice, i'm using a Fold which has same weird aspect ratio like yours.

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.

2 participants