Skip to content

Canvas: a trackpad swipe turns the page - #648

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
NikitkaRa:cursor/trackpad-swipe-7e0f
Oct 14, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
NikitkaRa:cursor/trackpad-swipe-7e0f

Conversation

@NikitkaRa

Copy link
Copy Markdown
Contributor

Summary

  • A two-finger swipe, and the mouse wheel, turns the page when the slide fits the window. The stronger axis wins: left or up goes to the next slide, right or down goes back. A nudge under 18 points is ignored, and a second flick within 0.35 seconds does not skip a slide.
  • During the slide show the same flick turns one page. The pen ignores it. On the end screen, a forward flick leaves the show, the same way the right arrow does.
  • A zoomed slide still pans. Pinch-zoom is unchanged.

Test plan

  • cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace (three known font environment skips), cargo xtask assets, layers, wasm
  • Unit tests: stronger axis wins, sideways swipe and the 0.35 s gate, vertical wheel still pages, zoomed slide pans, show swipe pages, pen ignores the flick
  • macOS live: horizontal scroll over a fitted slide went 1→2, a second flick in the same moment stayed on 2, a later flick went to 3, reverse went back to 2, the same flick at 300% zoom stayed put
  • macOS live slide show: a horizontal flick went from slide 0 to 1

A sideways flick changes slides when the slide fits the window, and any
flick does so during the show. One gesture turns one page. A zoomed slide
still pans. Pinch-zoom is unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit bd607f3 into storytold:main Oct 14, 2026
h-a-n-a-s-h-i pushed a commit that referenced this pull request Oct 14, 2026
… on land-r5 (#644 #652 #655 #702 #571 #539 #674 #648 #697 #479 #369 #368)

# Conflicts:
#	crates/ui-egui/src/canvas.rs
#	crates/ui-egui/src/ribbon.rs
@echelon

echelon commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thank you for this contribution, @NikitkaRa! It has landed on main and will ship in the next DeckCraft release.

If you haven't already, please come join us on Discord: https://discord.gg/artcraft

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.

3 participants