Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » The Case of Shrunken Icons
The Case of Shrunken Icons [message #463191] Fri, 28 October 2005 23:15
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 14
Registered: July 2009
Junior Member
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: Wed Apr 24 13:54:28 GMT 2024

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

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

Back to the top