-
Notifications
You must be signed in to change notification settings - Fork 243
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
Root toggle node buttons are partially drawn even if toShowRoot is False. #811
Comments
I compiled your project with Delphi 10.2.3 and the latest VTV source from GitHub master but could not see any partially painted toggle buttons. Can you please submit a screenshot? |
It seems that there is an additional 1 pixel offset in your screenshot that could be a result of the refactorings for #369. Increasing the value of the property Actually the toggle buttons should not be painted at all, but previous version just properly painted them outside the viewport. |
That fixed it, thanks! |
Hi,
Commit ad586ea has introduced a regression in drawing of toggle node buttons. When toShowRoot is turned off, the toggle buttons of root nodes should not be visible, but currently they are partially visible.
To reproduce, run the provided example and have a look at the leftmost column.
example.zip
The issue seems to be in TBaseVirtualTree.PaintTree, before the mentioned commit an offset (ofsControlMargin) was being applied :
PaintNodeButton(Canvas, Node, Column, CellRect, Offsets[ofsToggleButton] - Offsets[ofsControlMargin], ButtonY, BidiMode);
and after the commit it's not:
PaintNodeButton(Canvas, Node, Column, CellRect, Offsets[ofsToggleButton], ButtonY, BidiMode);
The master branch no longer contains ofsControlMargin, so I assume this offset should be applied in some other way?
The text was updated successfully, but these errors were encountered: