Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » The Case of Shrunken Icons
The Case of Shrunken Icons [message #463191] Fri, 28 October 2005 19:15
Eclipse UserFriend
One of my CheckboxTreeViewers all of a sudden started rendering the icons
really tiny (maybe 6x6 pixes or so). They are not the red squares that
indicate that the icon could not be loaded. They trully look like the
shrunken version of the real (normal-sized icons). Any ideas of what might
have caused that? I would attach the screenshot, but I don't see a way to
do that.

I do something like the following code to load the icons. This has worked
for me in the past. Not sure what's different now.

String plugin = ...
String iconPath = ...

final String key = plugin + ":" + iconPath;
Image image = this.imageRegistry.get( key );

if( image == null )
{
final Bundle bundle = Platform.getBundle( plugin );
final URL url = bundle.getEntry( iconPath );

this.imageRegistry.put( key, ImageDescriptor.createFromURL( url ) );
image = this.imageRegistry.get( key );
}
Previous Topic:Table/TableViewer stationary columns?
Next Topic:Custom Event Handlers
Goto Forum:
  


Current Time: Fri Jul 04 02:39:20 EDT 2025

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

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

Back to the top