|
|
|
|
Re: Blurry context buttons on subsequent use [message #1873331 is a reply to message #1873328] |
Thu, 12 December 2024 02:55   |
Eclipse User |
|
|
|
Hi Michael,
The bug is caused by the constructor of org.eclipse.swt.graphics.Image#Image(org.eclipse.swt.graphics.Device, org.eclipse.swt.graphics.Image, int), used in ContextButton class.
Using this constructor, the base image is degraded.
It is a SWT bug on MacOS.
I will report it on SWT GitHub today or tomorrow.
In the meantime, I was able to work around the bug in my fork of Graphiti.
I replaced that...
Image image;
if (!isEnabled()) {
image = new Image(originalImage.getDevice(), originalImage, SWT.IMAGE_DISABLE);
} else {
if (originalImage == null) {
return;
}
image = new Image(originalImage.getDevice(), originalImage, SWT.IMAGE_COPY);
}
... with
if (originalImage == null) {
return;
}
Image image;
if (!isEnabled()) {
final Image tmpImage = new Image(originalImage.getDevice(), originalImage.getImageData());
image = new Image(originalImage.getDevice(), tmpImage, SWT.IMAGE_DISABLE);
tmpImage.dispose();
} else {
image = new Image(originalImage.getDevice(), originalImage.getImageData());
}
---
Christophe
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04356 seconds