feat(button,dialog): Button.PreferredWidth + Dialog.PlainTitle - #431
Merged
Conversation
Two seams a host needs to lay out buttons to fit and to give a modal a calmer
card look:
- Button.PreferredWidth() reports the intrinsic width the button needs for its
CURRENT content — leading icon, caption and shortcut with their paddings — so
a host sizes a button to fit instead of hard-coding a width that clips a
longer or toggled label (Source vs WYSIWYG) or an added icon/shortcut.
- Dialog.PlainTitle draws the title bar in the panel Surface (OnSurface title +
controls, a bottom hairline) instead of the accent fill, for a card-style
modal. The zero value keeps the accent bar, so existing dialogs are unchanged.
Both are pixel-tested; PlainTitle is added to the Dialog MVVM allowlist (a
set-once appearance flag like Closable). 100% coverage gate green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Two seams a host needs to lay out buttons to fit and to give a modal a calmer card look:
Button.PreferredWidth()— the intrinsic width the button needs for its current content (leading icon + caption + shortcut, with paddings), so a host sizes buttons to fit instead of hard-coding a width that clips a longer or toggled label (Source vs WYSIWYG) or an added icon/shortcut.Dialog.PlainTitle— draws the title bar in the panel Surface (OnSurface title + controls, a bottom hairline) instead of the accent fill, for a card-style modal. Zero value keeps the accent bar (existing dialogs unchanged).Both pixel-tested;
PlainTitleadded to the Dialog MVVM allowlist. 100% coverage gate green.