Skip to content

fix #13813 : Dark Mode: The ForeColor & BackColor properties are not working for the controls #13818

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Epica3055
Copy link
Member

@Epica3055 Epica3055 commented Aug 18, 2025

Fixes #13813

Proposed changes

Add code to see if BackColor or ForeColor is specified in dark mode, if so then use the specified color, if not then let the renderer decide the color.

Screenshots

Before

image

After

image

@github-actions github-actions bot added the area-DarkMode Issues relating to Dark Mode feature label Aug 18, 2025
@dotnet-policy-service dotnet-policy-service bot added the draft draft PR label Aug 18, 2025
@@ -170,6 +170,8 @@ private protected override bool OwnerDraw
// ...the user wants to opt out of implicit DarkMode rendering.
&& DarkModeRequestState is true

&& !ForeColorSet
&& !BackColorSet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the right approach, if we wanted the set color to change the renderer.
But I think, we should not do it.

We should only take ForeColor and BackColor in DarkMode into account, if the Flat- or the Popup renderer is activated.

And then the question is: Could we "just" figure out, if Back/ForeColor should be serialized with the current setting, and if, only then take that color then into account for the Back and ForeColor renderer?

@KlausLoeffelmann KlausLoeffelmann added the waiting-author-feedback The team requires more information from the author label Aug 18, 2025
@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback The team requires more information from the author label Aug 19, 2025
@KlausLoeffelmann KlausLoeffelmann marked this pull request as ready for review August 19, 2025 17:08
@KlausLoeffelmann KlausLoeffelmann requested a review from a team as a code owner August 19, 2025 17:08
@KlausLoeffelmann
Copy link
Member

Hey @Epica,

could you see why the test fails and then squash the commits and rebase?
Ping me, if you want me to explain in more detail, what I mean exactly. :-)

Thanks for your help!

@KlausLoeffelmann KlausLoeffelmann added the servicing-consider .NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria label Aug 19, 2025
@dotnet-policy-service dotnet-policy-service bot removed the draft draft PR label Aug 19, 2025
Copy link

codecov bot commented Aug 20, 2025

Codecov Report

❌ Patch coverage is 14.28571% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.10244%. Comparing base (8818780) to head (5693427).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13818         +/-   ##
===================================================
- Coverage   77.10728%   77.10244%   -0.00485%     
===================================================
  Files           3273        3273                 
  Lines         644882      644929         +47     
  Branches       47688       47692          +4     
===================================================
+ Hits          497251      497256          +5     
- Misses        143958      144001         +43     
+ Partials        3673        3672          -1     
Flag Coverage Δ
Debug 77.10244% <14.28571%> (-0.00485%) ⬇️
integration 18.99287% <3.57143%> (+0.00769%) ⬆️
production 51.91693% <14.28571%> (-0.00675%) ⬇️
test 97.41248% <ø> (ø)
unit 49.33104% <14.28571%> (-0.01501%) ⬇️

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.

@Epica3055
Copy link
Member Author

@KlausLoeffelmann
Yes, an explanation will be perfect 😁

@rbhanda rbhanda added servicing-approved .NET Shiproom approved the PR for merge and removed servicing-consider .NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria labels Aug 21, 2025
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 servicing-approved .NET Shiproom approved the PR for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dark Mode: The ForeColor & BackColor properties are not working for the controls
3 participants