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

Update the drawing position of the Treeview control text #12638

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

Conversation

LeafShi1
Copy link
Member

@LeafShi1 LeafShi1 commented Dec 13, 2024

Fixes #12601

Proposed changes

  • Update the drawing position of the Treeview control text

Customer Impact

  • The check box of the TreeView control can be fully displayed

Regression?

  • No

Risk

  • Minimal

Screenshots

Before

Create a form, add a TreevView with CheckBoxes=true and DrawMode=OwnerDrawText
In OnDrawNode event only set DrawDefault=true
Show the form: checkboxes are shown corrupted on the right border
Image

After

The checkbox of the Treeview control can be fully displayed
image

Test methodology

  • Manually

Test environment(s)

  • .net 10.0.0-alpha.1.24611.1
Microsoft Reviewers: Open in CodeFlow

@LeafShi1 LeafShi1 requested a review from a team as a code owner December 13, 2024 08:49
@LeafShi1 LeafShi1 requested review from Epica3055 and Tanya-Solyanik and removed request for a team December 13, 2024 08:49
@LeafShi1 LeafShi1 self-assigned this Dec 13, 2024
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.01356%. Comparing base (c9c06a5) to head (e9204ba).
Report is 29 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #12638         +/-   ##
===================================================
- Coverage   76.01450%   76.01356%   -0.00094%     
===================================================
  Files           3176        3176                 
  Lines         638840      638840                 
  Branches       47169       47169                 
===================================================
- Hits          485611      485605          -6     
- Misses        149718      149733         +15     
+ Partials        3511        3502          -9     
Flag Coverage Δ
Debug 76.01356% <0.00000%> (-0.00094%) ⬇️
integration 18.13630% <0.00000%> (-0.00777%) ⬇️
production 49.79352% <0.00000%> (-0.00212%) ⬇️
test 97.03765% <ø> (ø)
unit 47.01537% <0.00000%> (+0.00210%) ⬆️

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

@ricardobossan
Copy link
Member

I tested the PR, and the reported issue appears to be resolved:

image

However, when DrawMode is set to OwnerDrawText, the node names disappear. Is this the intended behavior?

Screenshot 2024-12-13 170301

Other than that, the code looks good to me.

@LeafShi1 LeafShi1 added the waiting-review This item is waiting on review by one or more members of team label Dec 17, 2024
@Tanya-Solyanik
Copy link
Member

@LeafShi1 @ricardobossan - had you tested this fix in different DPI settings?

@Tanya-Solyanik Tanya-Solyanik added 📭 waiting-author-feedback The team requires more information from the author and removed waiting-review This item is waiting on review by one or more members of team labels Dec 18, 2024
@LeafShi1
Copy link
Member Author

@LeafShi1 @ricardobossan - had you tested this fix in different DPI settings?

Tested on 225% DPI (The main screen is 225% DPI, the secondary screen is 100% DPI)
AfterChange

@dotnet-policy-service dotnet-policy-service bot added untriaged The team needs to look at this issue in the next triage and removed 📭 waiting-author-feedback The team requires more information from the author labels Dec 20, 2024
@LeafShi1 LeafShi1 added waiting-review This item is waiting on review by one or more members of team and removed untriaged The team needs to look at this issue in the next triage labels Dec 20, 2024
@Tanya-Solyanik Tanya-Solyanik added 📬 waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) waiting-on-team This work item needs to be discussed with team or is waiting on team action in order to proceed and removed waiting-review This item is waiting on review by one or more members of team 📬 waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) labels Dec 20, 2024
@Tanya-Solyanik
Copy link
Member

@LeafShi1 - this might be a good issue to make conditional on an AppContext switch, we'll have to discuss it in a team meeting.
@merriemcgaw - we are changing layout by 1 pixel, it might be visible if customer had specific background to the tree nodes. DO you think this warrants an opt-out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-team This work item needs to be discussed with team or is waiting on team action in order to proceed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TreeView with checkboxes and DrawDefault = true renders incorrectly
3 participants