Add zoom controls for the preview pane#442
Conversation
Provide Actual Size (Cmd+0), Zoom In (Cmd++), and Zoom Out (Cmd+-) menu items plus a toolbar dropdown so users can rescale the rendered preview for readability, presentations, or larger displays. Zoom level persists across launches and snaps to preset increments: 50, 75, 90, 100, 110, 125, 150, and 200 percent.
|
Thank you for this, @dpankros — it's genuinely the strongest of the zoom PRs. 🙏 While reviewing the cluster of zoom PRs together, one thing stood out: the other implementations route preview scaling through We've consolidated the design across all the zoom PRs into #470, which unifies editor and preview zoom behind a single ⌘+/⌘−/⌘0 key pair, persisted as its own preference. Your PR is the basis for the preview half of that feature, and the decision to go with a persisted single preference is built directly on your approach. No action needed from you — we'll build on your work as the starting point, layer in the editor-font scaling, and handle the menu-shortcut relocation on our side. Leaving this open for now as a building block while #470 comes together. Really appreciate the contribution! Generated by Claude Code |
Summary
Adds zoom controls for the rendered preview pane:
Implementation uses the legacy
WebView setPageSizeMultiplier:APIalready exposed in
WebView+WebViewPrivateHeaders.h.Test plan
MPPreviewZoomTests.mcover default level, snap up/downfrom on- and off-preset values, min/max clamping, and Actual Size reset