Fix Settings panel layout clipping and field overlap#399
Merged
Conversation
Three Auto Layout problems caused content to be clipped or overlapping in the Settings window: - Editor tab: Behavior box height constraint was 175pt, insufficient for 7 checkboxes (needed ~182pt). Increased to 200pt and expanded root view height from 402pt to 427pt. - General tab: Eight checkboxes had explicit height=14pt constraints, forcing them below their 18pt intrinsic height. Removed these constraints so buttons render at full height. Expanded root view height from 289pt to 325pt to accommodate the taller content. - Rendering/Compilation tab: CSS popup (161pt) + segmented control (118pt) + margins exceeded the 405pt panel width, causing horizontal overflow. Expanded root view width from 405pt to 430pt. Also adds regression tests asserting minimum frame dimensions for all three panels, so future changes cannot silently re-introduce clipping. Related to #397
Contributor
Code Coverage ReportCurrent Coverage: 60.44% Coverage Details (Summary) |
Calling [vc view] in a unit test context loads the NIB and activates all CocoaBindings (e.g. self.preferences.markdownManualRender). This causes a crash in the test environment where the full app infrastructure is not running. The visual fixes in the XIB files remain correct. Related to #397
schuyler
pushed a commit
that referenced
this pull request
Jun 22, 2026
The Preferences panes pinned their content to the hard-coded English XIB frame size, so longer localized strings (French, Italian) overlapped or were clipped regardless of window size. PR #399 bumped the fixed sizes but did not generalize. - MPPreferencesViewController.loadView now keeps the designed width but measures the height the content needs at that width for the active locale (Auto Layout fitting size), never shrinking below the English design height. Resizable + centered-content behavior is preserved. - Editor "Behavior" box: drop the fixed height=200 constraint and anchor the box content to its last checkbox so it hugs wrapped text. - Compilation/HTML pane: decouple the "CSS:" label width from the "Default path:" label (it forced the CSS column wide in French and overlapped the Theme controls); give the CSS label its own leading. - Enable word wrapping on checkbox titles across all panes. - Add tests asserting boxes hug content, label widths are independent, checkboxes wrap, panes are unambiguous, and content is sized to fit. Related to #397
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three Auto Layout bugs in the Settings/Preferences window caused content to be clipped or fields to overlap. All three share the same root cause: XIB root view frames and internal container constraints were too small for their content. (
MPPreferencesViewController.mfreezes each panel at the size of its XIB root frame, so any content needing more space gets clipped.)Editor tab: The Behavior NSBox had a hard-coded
height=175ptconstraint. Seven checkboxes need ~182pt minimum — the last checkbox ("Auto-increment numbering in ordered lists") was clipped. Fixed by increasing the constraint to200ptand the panel height from402→427pt.General tab: Eight checkboxes had explicit
height=14ptconstraints, forcing them below their 18pt intrinsic height. Removed these constraints so buttons render correctly. Panel height increased from289→325ptto accommodate the taller content (and provide breathing room for longer French translations).Rendering/Html tab: The CSS popup (161pt) + segmented control (118pt) + margins summed to ~412pt, exceeding the 405pt panel width, causing horizontal overflow. Panel width increased from
405→430pt.Also adds three regression tests asserting minimum frame dimensions, so future changes cannot silently re-introduce clipping.
Related Issue
Related to #397
Manual Testing Plan
French locale testing:
defaults write com.uranusjr.macdown3000 AppleLanguages '("fr")'defaults delete com.uranusjr.macdown3000 AppleLanguagesEdge cases: Toggle between tabs several times to confirm no reflow artifacts; verify on Retina display for pixel alignment around the Behavior box border.
Review Notes
MPGeneralPreferencesViewController.xibwere not refreshed (requires Xcode on macOS); this is cosmetic and does not affect runtime layout.