winforms icon indicating copy to clipboard operation
winforms copied to clipboard

Fix 13627 DemoConsole app: The open button cannot be seen in TreeView Tasks dialog in Dark Mode

Open Epica3055 opened this issue 6 months ago • 2 comments

Fix #13627

Root Cause

We did custom painting in protected override void OnPaint(PaintEventArgs e) and this method only get invoked when OwnerDraw is true. But now the parent class OwnerDraw 's logic is changed , that makes OwnerDraw false.

Proposed changes

  • We need to set OwnerDraw true to be able to draw the button ourselves. So we set FlatStyle to Popup to break parent class's OwnerDraw logic.

Screenshots

Before

image

After

Issue_13627

Test methodology

  • manual test
Microsoft Reviewers: Open in CodeFlow

Epica3055 avatar Jun 20 '25 03:06 Epica3055

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 76.60343%. Comparing base (08485db) to head (4f9ddac). Report is 8 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13631         +/-   ##
===================================================
- Coverage   76.60828%   76.60343%   -0.00485%     
===================================================
  Files           3253        3253                 
  Lines         640996      641000          +4     
  Branches       47439       47439                 
===================================================
- Hits          491056      491028         -28     
- Misses        146290      146322         +32     
  Partials        3650        3650                 
Flag Coverage Δ
Debug 76.60343% <0.00000%> (-0.00485%) :arrow_down:
integration 18.99043% <0.00000%> (-0.00341%) :arrow_down:
production 51.05856% <0.00000%> (-0.01045%) :arrow_down:
test 97.41175% <ø> (ø)
unit 48.43719% <0.00000%> (-0.00971%) :arrow_down:

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

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jun 20 '25 03:06 codecov[bot]

Please add Root Cause in the description

LeafShi1 avatar Jun 26 '25 01:06 LeafShi1