[jbosstools-issues] [JBoss JIRA] (JBIDE-20383) HTML5 Palette: Missing icon image on Most Popular/Last Used palette group

Daniel Azarov (JIRA) issues at jboss.org
Fri Jul 24 16:31:02 EDT 2015


     [ https://issues.jboss.org/browse/JBIDE-20383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Azarov updated JBIDE-20383:
----------------------------------
    Description: 
We generated image for "Most Popular/Last Used" palette group with code like that:
{code}
Image resultImage = new Image(Display.getCurrent(), descriptors.size()*16, 16);
ImageData data = resultImage.getImageData();
data.alpha = 0;
resultImage = new Image(Display.getCurrent(), data);
final GC gc = new GC(resultImage);
int x = 0;
for (ImageDescriptor descriptor : descriptors) {
	if(descriptor != null){
		Image image = descriptor.createImage(Display.getCurrent());
		gc.drawImage(image, x, 0);
		x += image.getBounds().width;
	}
}
gc.dispose();
imageDescriptor = ImageDescriptor.createFromImage(resultImage);
{code}
With new SWT it does not work on Windows.

!HTML5Palette.ong!

Not working part is changing of ImageData, without it generated image is not transparent.

So we decided to replace generation to fixed icon image:

!NewMostPopularIcon.png!

  was:
We generated image for "Most Popular/Last Used" palette group with code like that:
{code}
Image resultImage = new Image(Display.getCurrent(), descriptors.size()*16, 16);
ImageData data = resultImage.getImageData();
data.alpha = 0;
resultImage = new Image(Display.getCurrent(), data);
final GC gc = new GC(resultImage);
int x = 0;
for (ImageDescriptor descriptor : descriptors) {
	if(descriptor != null){
		Image image = descriptor.createImage(Display.getCurrent());
		gc.drawImage(image, x, 0);
		x += image.getBounds().width;
	}
}
gc.dispose();
imageDescriptor = ImageDescriptor.createFromImage(resultImage);
{code}
With new SWT it does not work on Windows.
Not working part is changing of ImageData, without it generated image is not transparent.
So we decided to replace generation to fixed icon image



> HTML5 Palette: Missing icon image on Most Popular/Last Used palette group
> -------------------------------------------------------------------------
>
>                 Key: JBIDE-20383
>                 URL: https://issues.jboss.org/browse/JBIDE-20383
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: jsp/jsf/xml/html-source-editing
>         Environment: Windows 8, Eclipse Mars
>            Reporter: Daniel Azarov
>            Assignee: Daniel Azarov
>             Fix For: 4.3.0.CR1
>
>         Attachments: HTML5Palette.png, NewMostPopularIcon.png
>
>
> We generated image for "Most Popular/Last Used" palette group with code like that:
> {code}
> Image resultImage = new Image(Display.getCurrent(), descriptors.size()*16, 16);
> ImageData data = resultImage.getImageData();
> data.alpha = 0;
> resultImage = new Image(Display.getCurrent(), data);
> final GC gc = new GC(resultImage);
> int x = 0;
> for (ImageDescriptor descriptor : descriptors) {
> 	if(descriptor != null){
> 		Image image = descriptor.createImage(Display.getCurrent());
> 		gc.drawImage(image, x, 0);
> 		x += image.getBounds().width;
> 	}
> }
> gc.dispose();
> imageDescriptor = ImageDescriptor.createFromImage(resultImage);
> {code}
> With new SWT it does not work on Windows.
> !HTML5Palette.ong!
> Not working part is changing of ImageData, without it generated image is not transparent.
> So we decided to replace generation to fixed icon image:
> !NewMostPopularIcon.png!



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jbosstools-issues mailing list