When in my RCP application a decorator is added to an icon in a TreeViewer, the background of the icon is black on macOS.
The decorator shown is simple:
public class GroupDecorator extends LabelProvider implements ILightweightLabelDecorator {
public static final String IMAGE_PATH = "overlays/folder_decorator.png";
@Override
public void decorate(Object o, IDecoration decoration) {
if(o instanceof Group<?>
&& !(o instanceof IISO27Scope)
&& !(o instanceof Asset)
&& !(o instanceof ImportBpGroup)) {
decoration.addOverlay(ImageCache.getInstance().getImageDescriptor(IMAGE_PATH));
}
}
}
Full source code is on GitHub: GroupDecorator.java
You can find the decorator image file here: overlays/folder_decorator.png
Eclipse RCP version is 2019-06 / 4.12. MacOS version is Catalina 10.15.2. The shown problem does not occur on Linux and on Windows. It also does not occur with Eclipse RCP 4.7 on macOS Catalina.
How can I make the background white?
This looks like the SWT bug - https://bugs.eclipse.org/bugs/show_bug.cgi?id=310387 and has been fixed in Eclipse 2020-03.