Repository navigation
Match Canvas command toolbar spacing to Normal mode - #843
Merged
Merged
Conversation
The Canvas Run/custom-command cluster is one toolbar item, so NSToolbar adds its horizontal inset only once. Add the missing per-item inset back as HStack spacing and horizontal padding so the capsule matches the Normal and Shelf toolbars.
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
In Canvas mode, the Run and custom-command buttons sat closer together than in Normal and Shelf mode, and the capsule had smaller edge margins.
Cause: Normal and Shelf render each button as its own NSToolbar item, and NSToolbar gives every item a horizontal inset. Canvas renders the whole cluster as one item (an approved exception that prevents the insert/remove jump when switching cards), so it gets that inset only once. The old
HStack(spacing: 0)assumed the Normal buttons sit nearly flush, which is not true on the current OS.Fix:
CanvasCommandClusteradds the inset back:HStackspacing 3.5pt and horizontal padding 3pt. The cluster is now a helper,canvasCommandCluster, to keepcanvasToolbarContentwithin the lint body-length limit. The docs-ai 061 toolbar guide records the new rendering.Verification
make checkandmake build-apppass.