feat: tap-to-turn-page for comics/PDF; theme the EPUB chrome to the reading theme - #64
Merged
Merged
Conversation
…eading theme Comics/PDF now match the EPUB reader's own left/right tap-to-turn-page gesture: ZoomableBox reports the fraction across the width a tap landed at instead of a bare signal, and the reader treats the outer 30 percent on each side as previous/next (left back, right forward, same split reader.js already uses), the middle third as the chrome toggle. Disabled while zoomed in, matching the pager's own swipe-disabled-while-zoomed behavior. Separately, the EPUB reader's own top/bottom bars and progress slider were following the app's global light/dark setting, completely independent of which reading theme (light/sepia/dark/black/forest) is actually selected -- a light bar sitting on a black page reads as broken, which is what prompted this: 'the progress control looks weird when page is black theme.' The chrome now derives its own light/dark Material scheme from the selected reading theme instead (keeping the app's own accent color), so the bar and slider always sit on a scheme that actually matches the page behind them. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M421Z8byhEsWKMq7eWWqDN
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.
Two related reader-UX fixes:
Tap-to-turn-page for comics/PDF
PageReaderScreen(comics/PDF) only had swipe navigation and a tapanywhere to toggle the chrome. Brought it in line with the EPUB reader's
own gesture handling (
reader.js'sx<0.3/x>0.7/else split): the outer30% on each side turns the page (left back, right forward), the middle
third toggles the chrome. Disabled while zoomed in, same as the pager's
own swipe-disabled-while-zoomed behavior.
ZoomableBox'sonTapcallback now reports the horizontal fraction atap landed at instead of a bare signal, since it's the only caller and
this is what a reader needs to distinguish edge taps from a middle tap.
Theme the EPUB chrome to the actual reading theme
The EPUB reader's top/bottom bars and progress slider were following the
app's global light/dark setting — completely independent of which
reading theme (light/sepia/dark/black/forest) is actually selected. A
light-colored bar sitting on a black page reads as broken, which is what
prompted: "the progress control looks weird when page is black theme."
The chrome now derives its own light/dark Material color scheme from the
selected reading theme instead (keeping the app's own accent color), so
the bar and slider always sit on a scheme that actually matches the page
behind them.
Dark mode itself for EPUB already existed (light/sepia/dark/black/forest
swatches in the Display sheet) — this just fixes the chrome not matching
it, not the theming feature itself.
🤖 Generated with Claude Code