-
Notifications
You must be signed in to change notification settings - Fork 941
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
Fix ControlPaint regressions #3956
Merged
Merged
Conversation
This file contains 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
GDI and GDI+ don't end their lines and rectangles on the same pixel. Lines end on the prior pixel and rectangles draw the right and bottom one pixel over. - Fix the GDI coordinates to match the GDI+ rendering - Remove the GDI+ fork as it is impossible to set a transparent background color for NumericUpDown - Add initial rendering tests Validated with A/B testing between 3.1 and 5.0 with a loud background color. Validated with and without visual styles, enabled and disabled, and with different border styles.
* Fix ControlPaint.DrawBorder dashed/dotted drawing Fixes dotnet#3944 - Move return statement so it doesn't double draw - Add regression tests * Remove blank line
Fixes dotnet#3945 The DrawBorder overload that takes individual side parameters needed to adjust line ends when drawing in GDI. Manually validated output at different widths and transparencies between 3.1 and 5.0. Will follow up with automated regression tests in a separate PR.
End point needed adjusted for GDI to match GDI+ Fixes dotnet#3953
JeremyKuhne
added
the
Servicing-consider
.NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria
label
Sep 19, 2020
ghost
assigned JeremyKuhne
Sep 19, 2020
Codecov Report
@@ Coverage Diff @@
## release/5.0-rc2 #3956 +/- ##
==========================================================
- Coverage 67.64830% 36.55205% -31.09626%
==========================================================
Files 1410 921 -489
Lines 507284 250949 -256335
Branches 41180 36855 -4325
==========================================================
- Hits 343169 91727 -251442
+ Misses 158124 153961 -4163
+ Partials 5991 5261 -730
Flags with carried forward coverage won't be shown. Click here to find out more. |
This was
linked to
issues
Sep 21, 2020
RussKie
approved these changes
Sep 21, 2020
RussKie
added
Servicing-approved
.NET Shiproom approved the PR for merge
Servicing-consider
.NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria
and removed
Servicing-consider
.NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria
Servicing-approved
.NET Shiproom approved the PR for merge
labels
Sep 21, 2020
RussKie
added
Servicing-approved
.NET Shiproom approved the PR for merge
and removed
Servicing-consider
.NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria
labels
Sep 23, 2020
RussKie
added
the
📬 waiting-for-testing
The PR is awaiting manual testing by the primary team; no action is yet required from the author(s)
label
Sep 23, 2020
RussKie
removed
the
📬 waiting-for-testing
The PR is awaiting manual testing by the primary team; no action is yet required from the author(s)
label
Sep 28, 2020
ghost
locked as resolved and limited conversation to collaborators
Jan 30, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Proposing porting the changes that fix the class of off by one bugs for the end point of lines that were switched from GDI+ to GDI (for performance and memory usage). Note that the majority of the code in these commits are test code.
Fixes #3953
Fixes #3945
Fixes #3931
Fixes #3944
Proposed changes
Customer Impact
Regression?
Risk
Screenshots
UpDownControl example, before and after:
Good grab handle is on left, bad is on right: (while the right may look more appealing out of context making it "centered" would require all users to upgrade their code to get their existing behavior)
Good DrawBorder is on the left, bad on the right. The dotted/dashed are ok as that always draws with GDI+.
Bad DrawBorder on left, good on right.
Test methodology
Microsoft Reviewers: Open in CodeFlow