Skip to content

Add transient document zoom shortcuts#411

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

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
Copy link
Copy Markdown
Contributor

@yusufm yusufm commented May 3, 2026

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

@yusufm yusufm marked this pull request as ready for review May 3, 2026 20:34
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.

1 participant