Skip to content
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

Address non dark-mode coloring of listitem and treenode controls while in edit mode #12674

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pcblues
Copy link

@pcblues pcblues commented Dec 23, 2024

Fixes #12042 - TreeNode and ListItem not displaying in dark mode during editing, even though application is set to be in dark mode.

Proposed changes

If the application is in dark mode, capture the parent's windows message to identify the start of editing, and change the colour of the brush to match the parent's window color.

Customer Impact

Correction of incorrect color selection.

Regression?

  • Yes / No

Risk

I tried to limit the impact of the change to only occurring when the application is in dark mode. I'm not sure of the impact, if any, on custom ListView subitems, or custom-drawn TreeNodes.

Screenshots

Before

364259285-197881bf-5284-493c-b665-ee5d47c9541c

After

image

Test methodology

I used the test application provided to highlight the bug in the ticket to test the new behaviour.

Accessibility testing

Test environment(s)

Microsoft Reviewers: Open in CodeFlow
Microsoft Reviewers: Open in CodeFlow

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

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

Project coverage is 76.17915%. Comparing base (9780820) to head (29c8b90).

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #12674         +/-   ##
===================================================
- Coverage   76.18717%   76.17915%   -0.00802%     
===================================================
  Files           3193        3193                 
  Lines         640306      640334         +28     
  Branches       47237       47239          +2     
===================================================
- Hits          487831      487801         -30     
- Misses        148942      149001         +59     
+ Partials        3533        3532          -1     
Flag Coverage Δ
Debug 76.17915% <21.42857%> (-0.00802%) ⬇️
integration 18.15165% <0.00000%> (-0.02646%) ⬇️
production 50.11282% <21.42857%> (-0.01549%) ⬇️
test 97.02313% <ø> (ø)
unit 47.53694% <21.42857%> (-0.00538%) ⬇️

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

@pcblues
Copy link
Author

pcblues commented Dec 23, 2024

Hi there. I'm not sure what to do with the codecov report. For perspective, I have been a developer for 20 odd years, but haven't done changes through github for MS before. Cheers.

@dotnet-policy-service dotnet-policy-service bot added the draft draft PR label Dec 23, 2024
@Tanya-Solyanik Tanya-Solyanik added the area-DarkMode Issues relating to Dark Mode feature label Dec 23, 2024
@pcblues
Copy link
Author

pcblues commented Dec 24, 2024

@pcblues please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree

@pcblues pcblues marked this pull request as ready for review December 24, 2024 01:24
@pcblues pcblues requested a review from a team as a code owner December 24, 2024 01:24
@pcblues
Copy link
Author

pcblues commented Dec 24, 2024

This is my first PR for MS. I didn't really understand what was happening with the accessibility testing software.

@dotnet-policy-service dotnet-policy-service bot removed the draft draft PR label Dec 24, 2024
Copy link
Member

@KlausLoeffelmann KlausLoeffelmann left a comment

Choose a reason for hiding this comment

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

Hey @pcblues,

2 general issues I have on first sight with this PR:

  1. We are using DLL imports from CSWin32. Take a look at other samples how to utilize those and adapt the approach accordingly.

  2. We need to make sure we're not clashing with this approach when the users themselves are using owner drawing.

The latter issue is actually one where I would need to think about a bit more, if owner drawing is the way to go. Have you tested this with different HighDPI-Modes and other Font(s/ sizes) than the default font? Does that still work? Could you also try it in PMV2 with different Resolutions on the monitors? Thanks!

@dotnet-policy-service dotnet-policy-service bot added the 📭 waiting-author-feedback The team requires more information from the author label Jan 7, 2025
@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label Jan 13, 2025
@pcblues pcblues marked this pull request as draft January 13, 2025 08:21
@pcblues pcblues changed the title Changes to main branch to address #12042 Address non dark-mode coloring of listitem and treenode controls while in edit mode Jan 13, 2025
@dotnet-policy-service dotnet-policy-service bot added the draft draft PR label Jan 13, 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 draft draft PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dark Mode] The nodes of TreeView not in dark mode when editing it
3 participants