Image getting shrinked/expanded [message #905864] |
Fri, 31 August 2012 04:17  |
Eclipse User |
|
|
|
Hi,
The problem is if we set the image of the tree item first time, it is set correctly.When we set the second time with image of different size its being changed to the old image size.
In the attached screenshot image1.png ,the "Text" value field of the propertysheet contains an image.The image being used is PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_DEC_FIELD_WARNING) which returns the image of size 8*7(height *width).It sets the image correctly.
when we set the value of "Text" field,the image displayed should be changed of size 16*16.But image is getting shrinked to the old size i.e., 8*7 as shown in the screenshot image2.png.
If I repeat the cycle vice versa,first I set the image of size 16*16 ,it is set correctly.But If I set the image of size 8*7 for the second time,then its getting expanded because of the old image size(16*16)[Refer screenshots image3.png and image4.png]
Thanks
Ponraj
Attachment: image1.png
(Size: 2.33KB, Downloaded 1127 times)
Attachment: image2.png
(Size: 3.61KB, Downloaded 296 times)
Attachment: image3.png
(Size: 2.78KB, Downloaded 294 times)
Attachment: image4.png
(Size: 3.26KB, Downloaded 251 times)
|
|
|
Re: Image getting shrinked/expanded [message #906132 is a reply to message #905864] |
Fri, 31 August 2012 13:04  |
Eclipse User |
|
|
|
This is the spec'd behaviour, due to a win32 limitation, see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=114957 .
Grant
On 8/31/2012 4:17 AM, ponraj rajeshwar wrote:
> Hi,
>
> The problem is if we set the image of the tree item first time, it is set correctly.When we set the second time with image of different size its being changed to the old image size.
>
> In the attached screenshot image1.png ,the "Text" value field of the propertysheet contains an image.The image being used is PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_DEC_FIELD_WARNING) which returns the image of size 8*7(height *width).It sets the image correctly.
>
> when we set the value of "Text" field,the image displayed should be changed of size 16*16.But image is getting shrinked to the old size i.e., 8*7 as shown in the screenshot image2.png.
>
> If I repeat the cycle vice versa,first I set the image of size 16*16 ,it is set correctly.But If I set the image of size 8*7 for the second time,then its getting expanded because of the old image size(16*16)[Refer screenshots image3.png and image4.png]
>
> Thanks
> Ponraj
>
|
|
|
Powered by
FUDForum. Page generated in 0.02792 seconds