Fix modern RadioButton glyph clipping in RTL layouts - #14904
Open
LeafShi1 wants to merge 3 commits into
Open
Conversation
LeafShi1
requested review from
KlausLoeffelmann,
SimonZhao888 and
ricardobossan
and
a lite review from Copilot
August 19, 2026 06:17
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a WinForms rendering issue where the modern RadioButton glyph can clip on hover in right-to-left (RTL) layouts under .NET 11 visual styles, and adds a regression test intended to cover the scenario.
Changes:
- Add DPI-aware glyph padding in
RadioButtonModernAdapterto avoid RTL hover clipping. - Add a regression test for RTL + hover rendering behavior in
RadioButtonTests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/System.Windows.Forms/System/Windows/Forms/Controls/Buttons/ButtonInternal/RadioButtonModernAdapter.cs | Adds DPI-aware check padding for modern RadioButton layout to prevent glyph clipping. |
| src/test/unit/System.Windows.Forms/System/Windows/Forms/RadioButtonTests.cs | Adds a regression test targeting RTL hover clipping behavior for modern glyph rendering. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
|
Looks good to me! |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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.
Fixes #14898
Proposed changes
RadioButtonModernAdapter, preventing RTL hover clippingRadioButtonTestsCustomer Impact
RightToLeft.Yeswith .NET 11 visual styles, including during mouse hover. The change also respects DPI scaling.Regression?
Risk
Screenshots
Before
In .NET 11 visual styles, a
RadioButtonwithRightToLeft.Yesdisplayed a clipped glyph when hovered with the mouse.After
The RadioButton glyph has DPI-aware padding and renders fully without clipping in RTL layouts during mouse hover.
AfterChange.mp4
Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow