Commit c58a0f8
authored
Fix view menu toggle labels not updating after hide (#381)
## Summary
- Implements `splitView:canCollapseSubview:` (returns YES) so
NSSplitView tracks collapsed state
- Adds `editorVisible` / `previewVisible` properties to MPDocument based
on subview width
- Updates `validateMenuItem:` to toggle "Hide/Restore" labels using
visibility state
- Removes a guard in `setDividerLocation:` that skipped `setPosition:`
at ratio 0/1, which prevented NSSplitView from registering collapsed
subviews
Related to #377
## Test plan
- [x] 849 tests pass (0 unexpected failures)
- [x] View → Hide Editor Pane → label changes to "Restore Editor Pane"
- [x] View → Restore Editor Pane → editor restores, label changes back
- [x] Same for preview pane1 parent a888b62 commit c58a0f8
3 files changed
Lines changed: 271 additions & 50 deletions
File tree
- MacDown 3000.xcodeproj
- MacDownTests
- MacDown/Code/Document
0 commit comments