Fix issue 11939: [Dark Mode]HelpProvider text color is barely visible#14338
Fix issue 11939: [Dark Mode]HelpProvider text color is barely visible#14338SimonZhao888 wants to merge 1 commit intodotnet:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #11939 where the HelpProvider popup text color was barely visible in WinForms dark mode. Previously, clrForeground in the HH_POPUP struct was set to 0xFFFFFFFF (commented as "Ignore" — a "use default" sentinel), which caused the HtmlHelp API to use a default foreground color that didn't adapt to the WinForms theme. The fix replaces this with SystemColors.WindowText, consistent with how clrBackground was already set using SystemColors.Window.
Changes:
- Replace the
clrForeground"ignore" sentinel value inHH_POPUPwithSystemColors.WindowTextto ensure the popup text color matches the current WinForms theme (including dark mode).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14338 +/- ##
===================================================
+ Coverage 77.24039% 77.31714% +0.07674%
===================================================
Files 3280 3265 -15
Lines 645112 644447 -665
Branches 47731 47631 -100
===================================================
- Hits 498287 498268 -19
+ Misses 143133 142482 -651
- Partials 3692 3697 +5
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Fixes #11939
Proposed changes
Customer Impact
Regression?
Risk
Screenshots
Before
After
2026-03-02.095343.mp4
2026-03-02.095705.mp4
Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow