vi-eclipse / Eclipse-Platform

Umbrella repository for managing a backlog of features/issues related to the Eclipse Platform
2 stars 0 forks source link

Scaling Icons without transparency #71

Open amartya4256 opened 4 months ago

amartya4256 commented 4 months ago

In SWT, in Image's init method (line number 2003), there's a check for transparency which initializes an icon. There can be icons which are not transparent. In that case scaling them would not be possible since the init method is also used by the scaling method win32_getHandle.

The icon for the shell in the top right corner is set by setImages method in Decorations whoch specifically calls a method Display.createIcon which is identical to the block in init in Image (line no. 2003). Now that we have added the functionality of scaling to images. A non-transparent image created by createIcon method is unable to be scaled up using the win32_gethandle method since it doesn't end up in the block. Hence, adding an additional check for image.type == SWT.ICON lets it enter the block and scaled up properly.

We need to discuss on this topic and find out whats necessary.

Image

Also, Display.CreateIcon can be Image.createIcon since we want to create an icon from the Image and also since we allow Display to do certain things by using some public fields in the image, it makes the icon incompatible to be scaled properly by the getHandle method.

amartya4256 commented 3 months ago

@akoch-yatta this is the ticket for the icn issue (related to Program)