Skip to content

Add transient document zoom shortcuts#411

Closed
yusufm wants to merge 1 commit into
schuyler:mainfrom
yusufm:Codex/add-transient-zoom-shortcuts-019def52-b3da-7962-96cd-afa05d8d1592
Closed

Add transient document zoom shortcuts#411
yusufm wants to merge 1 commit into
schuyler:mainfrom
yusufm:Codex/add-transient-zoom-shortcuts-019def52-b3da-7962-96cd-afa05d8d1592

Conversation

@yusufm

@yusufm yusufm commented May 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add transient per-document zoom state for editor and preview scaling
  • Add View menu shortcuts for Zoom In, Zoom Out, and Actual Size
  • Clamp zoom between 50 percent and 300 percent without mutating saved font preferences
  • Remove conflicting Cmd-minus/Cmd-zero shortcuts from strikethrough/paragraph menu items

Root cause

The app had preview scaling tied only to the saved editor base font preference, so adding standard zoom shortcuts by changing that preference would permanently alter user settings and conflict with existing menu shortcuts.

Validation

  • ibtool --warnings --errors --notices MacDown/Localization/Base.lproj/MainMenu.xib
  • xcodebuild test -workspace 'MacDown 3000.xcworkspace' -scheme MacDown -destination 'platform=macOS' -only-testing:MacDownTests/MPPaneToggleTests/testZoomActionsUseTransientDocumentMultiplier -only-testing:MacDownTests/MPPaneToggleTests/testZoomActionsClampAtConfiguredBounds

Related to #335

Copy link
Copy Markdown
Owner

Thanks, @yusufm — appreciate this one. 🙏

We're consolidating the zoom work into a single plan in #470, which unifies editor and preview zoom behind one ⌘+/⌘−/⌘0 key pair. The editor-zoom scope here overlaps with #395 (which #470 builds on), so I'm closing this as a duplicate of that scope — but two ideas from this PR are being carried forward into the unified feature:

  • multiplicative zoom stepping (×/÷ rather than additive ±0.1), for nicer perceptual scaling, and
  • using fontWithDescriptor: to preserve font traits instead of fontWithName:size:.

Thanks for the contribution!


Generated by Claude Code

@schuyler schuyler closed this Jun 23, 2026
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.

2 participants