Turn page using single touchscreen tap#1468
Open
andrzej-az wants to merge 1 commit intojohnfactotum:gtk4from
Open
Turn page using single touchscreen tap#1468andrzej-az wants to merge 1 commit intojohnfactotum:gtk4from
andrzej-az wants to merge 1 commit intojohnfactotum:gtk4from
Conversation
| 'pressed': (gesture, n_press, x, y) => { | ||
| pressedX = x; | ||
| }, | ||
| 'released': (gesture, n_press, x, y) => { if (pressedX == x) setTimeout(() => {this.onTap(x,y)},100)} |
Owner
There was a problem hiding this comment.
Is there a reason why setTimeout is needed?
Author
There was a problem hiding this comment.
As far as I remember, the delay is needed thanks to swipe behavior: without it 2 or more pages will be turned.
Owner
|
Probably tapping will need to be handled in WebView and not on the GTK side because it needs to handle cases where there are clickable elements on the page. Although currently it doesn't support scripting and form submission, there's still |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pr allows to turn the page by single touchscreen tap. The reading area is divided vertically into two zones:
40% (left side): Tapping here navigates to the previous page.
60% (right side): Tapping here navigates to the next page.
tested on epub in "single page" and "scrolled" mode.
seems does not affect on other functionality
NOTE: this change affects touchscreen only, the mouse/touchpad behavior is left "as is"