Skip to content

Conversation

memoarfaa
Copy link

@memoarfaa memoarfaa commented May 20, 2025

Fixes #13475

Proposed changes

  • Adjust bitmap color transformation logic in ToolStripMenuItem.cs to render MainMenuStrip bitmaps correctly in dark mode.
  • Apply color matrix transformation to invert and adjust bitmap colors for dark mode in MDIParent scenarios.
  • Ensure icons visually match the dark theme when Application.SetColorMode(SystemColorMode.Dark) is enabled.

Customer Impact

  • Resolves an issue where MainMenuStrip bitmaps in MDIParent forms were drawn with light colors in dark mode.
  • Improves UI consistency for users utilizing dark mode in their WinForms applications.

Regression?

  • No

Risk

  • Low: Changes are isolated to bitmap rendering for dark mode and do not affect standard rendering paths.

Screenshots

Before

Screenshot 2025-05-18 020913

After

Screenshot 2025-05-20 053833

Test methodology

  • Manual testing in a sample MDI WinForms .NET Core project.
  • Verified that MainMenuStrip bitmaps render correctly in both light and dark modes.
  • Confirmed no regressions in standard (light mode) theme rendering.

Accessibility testing

Test environment(s)

  • .NET 10.0.100-preview5.25266.103
  • Windows 11 x64
Microsoft Reviewers: Open in CodeFlow

@memoarfaa memoarfaa requested a review from a team as a code owner May 20, 2025 02:43
@github-actions github-actions bot added the area-DarkMode Issues relating to Dark Mode feature label May 20, 2025
Copy link

codecov bot commented May 20, 2025

Codecov Report

Attention: Patch coverage is 8.33333% with 22 lines in your changes missing coverage. Please review.

Project coverage is 76.59986%. Comparing base (92e2dcc) to head (d40c89c).
Report is 4 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13480         +/-   ##
===================================================
- Coverage   76.60590%   76.59986%   -0.00604%     
===================================================
  Files           3230        3230                 
  Lines         639097      639180         +83     
  Branches       47289       47297          +8     
===================================================
+ Hits          489586      489611         +25     
- Misses        145945      146000         +55     
- Partials        3566        3569          +3     
Flag Coverage Δ
Debug 76.59986% <8.33333%> (-0.00604%) ⬇️
integration 18.78577% <0.00000%> (-0.00127%) ⬇️
production 51.00986% <8.33333%> (-0.00605%) ⬇️
test 97.40411% <ø> (ø)
unit 48.39842% <8.33333%> (+0.00308%) ⬆️

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@elachlan
Copy link
Contributor

@KlausLoeffelmann would be the go to on this I think?

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

Labels

area-DarkMode Issues relating to Dark Mode feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DarkMode] MDIParent MainMenuStrip Bitmaps draw with light Colors

2 participants