Skip to content

Conversation

@JeremyKuhne
Copy link
Member

@JeremyKuhne JeremyKuhne commented Apr 28, 2025

This was inadvertently flipped when changing to CsWin32. Moves helper code for using the PDF printer to write a regression test.

There is no practical workaround for this. If you're looking for whether a printer supports color, however, you can check PrinterSettings.SupportsColor instead.

Fixes #13367

Microsoft Reviewers: Open in CodeFlow

This was inadvertently flipped when changing to CsWin32.

Fixes dotnet#13367
Tanya-Solyanik
Tanya-Solyanik previously approved these changes Apr 28, 2025
@codecov
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

Attention: Patch coverage is 72.72727% with 9 lines in your changes missing coverage. Please review.

Project coverage is 62.62144%. Comparing base (37df563) to head (8c2f842).
Report is 3 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13385         +/-   ##
===================================================
- Coverage   62.63052%   62.62144%   -0.00908%     
===================================================
  Files           1561        1561                 
  Lines         159839      159851         +12     
  Branches       14915       14916          +1     
===================================================
- Hits          100108      100101          -7     
- Misses         58955       58974         +19     
  Partials         776         776                 
Flag Coverage Δ
Debug 62.62144% <72.72727%> (-0.00908%) ⬇️
integration 11.32273% <0.00000%> (-0.00419%) ⬇️
production 40.79770% <100.00000%> (-0.01558%) ⬇️
test 95.69309% <71.87500%> (-0.00549%) ⬇️
unit 38.20066% <100.00000%> (-0.01143%) ⬇️

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.

@JeremyKuhne JeremyKuhne merged commit 6c52f39 into dotnet:main Apr 28, 2025
8 checks passed
@JeremyKuhne
Copy link
Member Author

/backport to release/9.0

@github-actions
Copy link
Contributor

Started backporting to release/9.0: https://github.com/dotnet/winforms/actions/runs/14718863061

Tanya-Solyanik added a commit that referenced this pull request May 8, 2025
Backport of #13385 to release/9.0

/cc @JeremyKuhne

## Customer Impact
Reading `PageSettings.Color` gives the wrong value, there is no
workaround.

## Testing
Regression unit test.

## Risk
Low, this was a manual mistake in converting to source generated
interop.

###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/dotnet/winforms/pull/13389)
@github-actions github-actions bot locked and limited conversation to collaborators May 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PrinterSettings.DefaultPageSettings.Color returns wrong value

2 participants