Repository navigation
Scale the Anchor editor according to DPI - #13853
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the DPI scaling issue in the AnchorEditor component by replacing hard-coded pixel values with DPI-scaled equivalents. The Anchor editor in PropertyGrid now properly scales on high DPI environments instead of appearing too small at 300% DPI.
Key changes:
- Replace hard-coded pixel values (10, 30, 40, 60, 90) with DPI-scaled equivalents using
ScaleHelper.ScaleToInitialSystemDpi() - Update all UI element positioning and sizing to use the scaled values
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13853 +/- ##
===================================================
+ Coverage 77.10742% 77.12180% +0.01437%
===================================================
Files 3273 3273
Lines 644925 644924 -1
Branches 47692 47693 +1
===================================================
+ Hits 497285 497377 +92
+ Misses 143967 143873 -94
- Partials 3673 3674 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
69f453d to
8b7f313
Compare
KlausLoeffelmann
left a comment
There was a problem hiding this comment.
Looks good to me!
Do we need to bring this changes over to the OOP Designer?
Yes, I have submitted a PR https://github.com/microsoft/winforms-designer/pull/6459 in OOP designer, please review it. |

Related #13830
Proposed changes
InitializeComponentmethod to draw the Anchor Editor using the scaled size instead of hard-coding it.Customer Impact
Regression?
Risk
Screenshots
Before
In 300% DPI:

After
In 300% DPI:

Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow