eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

Adding EraseItem listener to a Tree can cause text to be slightly truncated

Open eobrienPilz opened this issue 1 year ago • 0 comments

  • [x ] I verified I can reproduce this issue against latest Integration Build of Eclipse SDK (4.33)

If a tree labelprovider is providing an Image and the tree has a SWT.EraseItem listener then the last character of the text in the first column is not completely drawn.

e.g. To see the issue add this code to ExtendedMarkersView and put a problem in the problem view.

tree.addListener(SWT.EraseItem, new Listener() { @OverRide public void handleEvent(Event event) { } });

I would expect the text in this case to be drawn correctly.

You can see below the last character is a little truncated. i.e. for the problem "Syntax cannot be resolved to a type". The last e character is not drawn correctly.

image

I see the issue on Windows 10 using Java 17 JDK

I originally raised this issue against SWT but it appears to be not just SWT issue. https://github.com/eclipse-platform/eclipse.platform.swt/issues/1279

  • [x ] I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.

eobrienPilz avatar Jun 13 '24 11:06 eobrienPilz