-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix ToolStripStatusLabel text visibility in High Contrast mode with System RenderMode #14110
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a visibility issue with ToolStripStatusLabel text in High Contrast mode when using System RenderMode. The fix ensures that text is properly highlighted against the background, making it readable for users who rely on high contrast accessibility features.
Key Changes:
- Moved
textRectdeclaration earlier in the method to enable its use in the high contrast highlight logic - Added highlight background rendering (
FillRectangle) for pressed and selected states in high contrast mode
| if (DisplayInformation.HighContrast) | ||
| { | ||
| g.FillRectangle(SystemBrushes.Highlight, textRect); | ||
| } |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an empty line after the closing brace for better readability and consistency with the project's code style guidelines. Empty lines should be inserted after structure blocks to separate logical sections of code.
| if (DisplayInformation.HighContrast) | ||
| { | ||
| g.FillRectangle(SystemBrushes.Highlight, textRect); | ||
| } |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an empty line after the closing brace for better readability and consistency with the project's code style guidelines. Empty lines should be inserted after structure blocks to separate logical sections of code.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #14110 +/- ##
===================================================
- Coverage 77.15789% 77.15384% -0.00405%
===================================================
Files 3279 3279
Lines 645317 645325 +8
Branches 47718 47720 +2
===================================================
- Hits 497913 497893 -20
- Misses 143717 143745 +28
Partials 3687 3687
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Fixes #14098
Proposed changes
Customer Impact
Regression?
Risk
Screenshots
Before
RuntimeIssue.mp4
After
ToolStripLabel.mp4
Test methodology
Microsoft Reviewers: Open in CodeFlow