Add configurable gap between pages option for webtoon reading - #206
Add configurable gap between pages option for webtoon reading#206madeindjs wants to merge 2 commits into
Conversation
Add a new 'Gap between pages' appearance setting (PAGE_GAP) that controls the spacing between consecutive pages in continuous/vertical mode. Previously this was a hardcoded 2px constant. Setting it to 0 gives seamless webtoon reading where a single image spans multiple pages without visible separators. Also fix the debug-only dump() assertion that crashed when scrolling with pageGap=0: sub-pixel float rounding during scroll could make adjacent pages overlap by a fraction of a pixel across their full width, triggering the assertion. Now requires both width and height overlap to exceed 1px before flagging an intersection.
When the user sets page gap to 0 for seamless webtoon reading, two remaining visual artifacts are now fixed: - Suppress the page border (DRAW_PAGE_BORDER) when pageGap=0, since the 1px black hairline stroke is counterproductive for seamless pages. - Make adjacent pages overlap by 1px internally (pageGap=-1) when the user sets 0, preventing the white View background from showing through sub-pixel gaps during scroll (visible as a blinking white line on dark pages). - Raise the dump() assertion threshold to >2px (both dimensions) to accommodate the intentional 1px overlap plus float rounding, while still catching genuine page overlaps.
|
@madeindjs Thank you for contribution!
|
|
@madeindjs please also use https://github.com/max-kammerer/orion-viewer/blob/master/docs/architecture.md. Feel free to ask any questions |
Add a new 'Gap between pages' appearance setting (PAGE_GAP) that controls the spacing between consecutive pages in continuous/vertical mode. Previously this was a hardcoded 2px constant. Setting it to 0 gives seamless webtoon reading where a single image spans multiple pages without visible separators.
Also fix the debug-only dump() assertion that crashed when scrolling with pageGap=0: sub-pixel float rounding during scroll could make adjacent pages overlap by a fraction of a pixel across their full width, triggering the assertion. Now requires both width and height overlap to exceed 1px before flagging an intersection.
Screenshots