Community
Participate
Working Groups
3.3 RC1. When enabling colored labels the icon and the text get shifted to the right and the margin between icon and text becomes smaller. The shifting is less bad than the small (almost inexistent) margin. This does not happen in WindowsXP. Should also check Mac.
Seems to be something special under linux. - open package explorer - open Java > Appearance preference page, move the page so you can see the package explorer in the back - check 'colored labels', press 'Apply' > image and the text in the package explorer move the horizontally to the right - uncheck 'colored labels', press 'Apply' We draw the image at event.x, the text at item.getTextBounds().x. Please advise if this is not the correct thing to do.
Created attachment 68536 [details] screenshot comparison
Under consideration for Eclipse 3.3 RC2.
Created attachment 68690 [details] Patch for OwnerDrawSupport class
The code in OwnerDrawSupport should be using getImageBounds() and getTextBounds(). There is still a bug in getTextBounds() on GTK, so you will not draw exactly like the operating system. We will not fix this bug for eclipse 3.3. There was a clipping bug in SWT.PaintItem that is fixed. Please apply the patch. It should be good enough for 3.3. Fixed > 20070524
+1
So - to summarize: - you found a bug in SWT.PaintItem and fixed, that's why this bug got closed - you found a bug in JDT UI --> filed bug 189083 for that. - you found another bug in SWT getTextBounds() --> filed bug 189084 for that as I could not find one in bugzilla