Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Image getting shrinked/expanded (Treeitem's image getting shrinked/expanded to the old image's size)
Image getting shrinked/expanded [message #905864] Fri, 31 August 2012 08:17 Go to next message
ponraj rajeshwar is currently offline ponraj rajeshwarFriend
Messages: 1
Registered: August 2012
Junior Member
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 99 times)
  • Attachment: image2.png
    (Size: 3.61KB, Downloaded 103 times)
  • Attachment: image3.png
    (Size: 2.78KB, Downloaded 101 times)
  • Attachment: image4.png
    (Size: 3.26KB, Downloaded 101 times)
Re: Image getting shrinked/expanded [message #906132 is a reply to message #905864] Fri, 31 August 2012 17:04 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2151
Registered: July 2009
Senior Member
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
>
Previous Topic:Making Composite to ScrolledComposite
Next Topic:SashForm not adapting to High Contrast Theme
Goto Forum:
  


Current Time: Mon Dec 22 22:48:53 GMT 2014

Powered by FUDForum. Page generated in 0.06335 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software