Skip to content

Conversation

@kognise
Copy link

@kognise kognise commented Oct 25, 2025

Implements trackpad pinch-to-zoom on macOS. Windows and Linux should be straightforward but I don't have requisite test devices with me right now.

  • All behavior tested on macOS. Does not cause any issues with existing scroll handling.
  • Follows the same propagation and blocking behavior as scroll events. Documentation has been updated accordingly.
  • I considered integrating into the scroll system, similar to what JavaScript does, but using a separate event is both more logical (the events are separate on every platform) and more backwards-compatible.
  • The ZoomDelta is temporarily tagged #[non_exhaustive] because implementations on future platforms might handle zoom deltas differently from macOS (e.g. pixel distance instead of a magnification change). Consumers of this API can just have a _ => {} match arm, which worst-case means their apps will continue to not have zoom functionality on Windows/Linux without intervention.

Release Notes:

  • N/A

@cla-bot
Copy link

cla-bot bot commented Oct 25, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @kognise on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@kognise
Copy link
Author

kognise commented Oct 25, 2025

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Oct 25, 2025
@cla-bot
Copy link

cla-bot bot commented Oct 25, 2025

The cla-bot has been summoned, and re-checked this pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants