-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add switch "MoveTreeViewTextLocOnePixel" for update the drawing position of the Treeview control text #12638
base: main
Are you sure you want to change the base?
Add switch "MoveTreeViewTextLocOnePixel" for update the drawing position of the Treeview control text #12638
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12638 +/- ##
===================================================
- Coverage 76.15013% 76.14689% -0.00325%
===================================================
Files 3192 3192
Lines 640167 640168 +1
Branches 47236 47237 +1
===================================================
- Hits 487488 487468 -20
- Misses 149165 149182 +17
- Partials 3514 3518 +4
Flags with carried forward coverage won't be shown. Click here to find out more. |
@LeafShi1 @ricardobossan - had you tested this fix in different DPI settings? |
Tested on 225% DPI (The main screen is 225% DPI, the secondary screen is 100% DPI) |
@LeafShi1 - this might be a good issue to make conditional on an AppContext switch, we'll have to discuss it in a team meeting. |
@Tanya-Solyanik can't hurt to have an opt-out, but I definitely don't think it is risky enough for opt-in. Let's go forward with the opt-out as an extra caution though. Just in case... |
src/System.Windows.Forms/src/System/Windows/Forms/Controls/TreeView/TreeView.cs
Outdated
Show resolved
Hide resolved
26ff3bf
to
43ce18d
Compare
Fixes #12601
Proposed changes
Customer Impact
Regression?
Risk
Screenshots
Before
Create a form, add a TreevView with CheckBoxes=true and DrawMode=OwnerDrawText
In OnDrawNode event only set DrawDefault=true
Show the form: checkboxes are shown corrupted on the right border
After
The checkbox of the Treeview control can be fully displayed
Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow