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

Fix drawing of tree lines #1193

Merged
merged 1 commit into from
May 10, 2023

Conversation

hermannoffen
Copy link
Contributor

  • changed method TBaseVirtualTree.DrawLineImage to not wrongly apply (scaled) FImagesMargin anymore
  • instead (if not Reverse) simply use FIndent decreased by one pixel to draw the line just next to a node

- changed method `TBaseVirtualTree.DrawLineImage` to not wrongly apply (scaled) `FImagesMargin` anymore
- instead (if `not Reverse`) simply use `FIndent` decreased by one pixel to draw the line just next to a node
@hermannoffen
Copy link
Contributor Author

hermannoffen commented May 10, 2023

The problem is currently not observable very prominently, but it is when private field FImagesMargin's value is increased or decreased in a significant way.

Check the reproduction demo of #1191 (after applying its corresping pull request #1192). A more detailed inspection is possible when setting LineStyle to lsSolid.

  1. Without this fix and a default FImagesMargin of 2, horizontal tree lines reach 3 pixels into the node's rect:
    image
  2. Without this fix and a much bigger FImagesMargin of 20, horizontal tree lines reach way too much into the nodes rect:
    image
  3. With this fix applied, horizontal tree lines are ending just at the node's content rect, as expected:
    image

FImagesMargin shouldn't affect the line drawing.

@hermannoffen hermannoffen marked this pull request as ready for review May 10, 2023 12:02
@joachimmarder joachimmarder merged commit 1ac60dd into JAM-Software:master May 10, 2023
@joachimmarder joachimmarder added this to the V8.0 milestone May 10, 2023
@hermannoffen hermannoffen deleted the fix-line-drawing branch May 11, 2023 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants