MudIconButton: Keep padding consistent between variants - #13563
Conversation
62e4e68 to
70c268f
Compare
danielchalmers
left a comment
There was a problem hiding this comment.
At 100%/200% scaling it's the same, but it fixes it at 125%/150%/175%. Chromium floors the 1px border to a whole device pixel while padding keeps its exact value, so dev renders filled 0.4/0.67/0.86px wider than outlined; this patch brings the delta to exactly 0, icon inset included.
Note for later: the reserved border is additive wherever padding is overridden at higher specificity, so filled icon buttons grow 2px under a consumer Class="pa-0" / Style="padding:0" and in a MudButtonGroup with OverrideStyles="false".
|
Could you replace the before/after with one screenshot of an outlined and a filled icon button next to each other, taken on a 125%-scaled display? They don't seem to show the defect. |
|
Updated with one 125%-scale comparison. |
|
Thank you! |
Keeps filled icon buttons aligned with outlined icon buttons by reserving the border space instead of changing the padding. The outer button size stays unchanged.
Fixes #10366
Tested in the UnitTests Viewer at 125% display scaling. The Viewer build passes with 0 warnings and 0 errors.
125% display scaling
Checklist: