[Preview7/Release] Backport 13747 DarkMode: SystemControlButton rendering #13748
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 System Control Button rendering issues in dark mode, where a control button is either rendering not in dark mode, or has rendering artefacts when rendering in the context of the property grid.
These issues have been pointed out by customers, and are, among others, one of the blockers for GitHub Extensions, which are emotionally discussed on their GitHub issues
gitextensions/gitextensions#9191 (comment)
(and also might even save lives gitextensions/gitextensions#11904)
Note while the latter is certainly an ironic-funny remark, those discussions around dark mode for WinForms app shows the high participation of the community and the desire to make this work, and note also that other issues which have been pointed out in other projects show us clearly, why we should accomodate rendering issues as early as possible to unblock them: GitExtension in particular but also other projects can provide their aspired .NET 10 based DarkMode-enabled versions as soon as .NET 10 becomes available.
Fixes rendering issues in dark mode rendering, where a button is used in the context of another control:
These buttons have not been rendered correctly in dark mode, and a new system control button renderer (tested by CTI) fixes these issues.
Note that this PR does not change the Classic (Light Mode) code paths in any way.
Examples:
Current versions have been tested by CTI and they also reassured that the Classic mode CodePaths (LightMode rendering) remain unchanged to minimize any risks.
Microsoft Reviewers: Open in CodeFlow