Skip to content

Conversation

@SimonZhao888
Copy link
Member

@SimonZhao888 SimonZhao888 commented Dec 4, 2025

Fixes #14098

Proposed changes

  • Modify PaintText() in ToolStripLabel class to make sure ToolStripStatusLabel text visibility in High Contrast mode with System RenderMode.

Customer Impact

  • ToolStripStatusLabel text visibility in High Contrast mode with System RenderMode.

Regression?

  • No

Risk

  • Minimal

Screenshots

Before

RuntimeIssue.mp4

After

ToolStripLabel.mp4

Test methodology

  • Manually
Microsoft Reviewers: Open in CodeFlow

Copy link
Contributor

Copilot AI left a 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 textRect declaration 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

Comment on lines +363 to +366
if (DisplayInformation.HighContrast)
{
g.FillRectangle(SystemBrushes.Highlight, textRect);
}
Copy link

Copilot AI Dec 4, 2025

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.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +372 to +375
if (DisplayInformation.HighContrast)
{
g.FillRectangle(SystemBrushes.Highlight, textRect);
}
Copy link

Copilot AI Dec 4, 2025

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.

Copilot generated this review using guidance from repository custom instructions.
@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.15384%. Comparing base (ae5cd21) to head (6757363).

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                 
Flag Coverage Δ
Debug 77.15384% <0.00000%> (-0.00405%) ⬇️
integration 18.99503% <0.00000%> (+0.00921%) ⬆️
production 52.01685% <0.00000%> (-0.00839%) ⬇️
test 97.40749% <ø> (ø)
unit 49.46119% <0.00000%> (-0.01528%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Accessibility][High Contrast] The text of toolStripStatuslabel item is not visible in HC Mode when setting the RenderMode as System & Enable the IsLink

1 participant