Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 22968 Details for
Bug 99295
Problems selecting 16x16 image from the WIndows *.ico
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
The code that picks the first image from WINDOW_IMAGES that is 16x16 and does not use alpha transparency
org.eclipse.update.ui.transparency-patch.txt (text/plain), 1.89 KB, created by
Dejan Glozic
on 2005-06-13 16:21:11 EDT
(
hide
)
Description:
The code that picks the first image from WINDOW_IMAGES that is 16x16 and does not use alpha transparency
Filename:
MIME Type:
Creator:
Dejan Glozic
Created:
2005-06-13 16:21:11 EDT
Size:
1.89 KB
patch
obsolete
>Index: src/org/eclipse/update/internal/ui/views/ConfigurationView.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/ConfigurationView.java,v >retrieving revision 1.103 >diff -u -r1.103 ConfigurationView.java >--- src/org/eclipse/update/internal/ui/views/ConfigurationView.java 10 Jun 2005 02:51:42 -0000 1.103 >+++ src/org/eclipse/update/internal/ui/views/ConfigurationView.java 13 Jun 2005 20:20:36 -0000 >@@ -364,8 +364,9 @@ > } > > private Image getProductImage16(IProduct product) { >- // We must be careful and poof up the image to test >- // the bounds to ensure we are picking 16x16 one. >+ // Loop through the product window images and >+ // pick the first whose size is 16x16 and does not >+ // alpha transparency type. > String windowImagesUrls = product.getProperty(IProductConstants.WINDOW_IMAGES); > if (windowImagesUrls != null ) { > StringTokenizer st = new StringTokenizer(windowImagesUrls, ","); //$NON-NLS-1$ >@@ -385,16 +386,12 @@ > } > if (edesc!=null) { > Image image = UpdateUI.getDefault().getLabelProvider().get(edesc); >- if (image.getBounds().width!=16) { >- //TODO this is just a fix to handle *.ico image. >- //The correct approach would be to somehow get access to >- //16x16 image in the icon. >- ImageData scaled = image.getImageData().scaledTo(16, 16); >- Image scaledImage = new Image(configurationWindow.getShell().getDisplay(), scaled); >- UpdateUI.getDefault().getLabelProvider().get(scaledImage, 0); >- return scaledImage; >+ Rectangle bounds = image.getBounds(); >+ if (bounds.width==16 && bounds.height==16) { >+ // avoid images with TRANSPARENCY_ALPHA >+ if (image.getImageData().getTransparencyType()!=SWT.TRANSPARENCY_ALPHA) >+ return image; > } >- return image; > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 99295
: 22968