Bug 4835 - [Workbench] Platform icons are ignored if they are too large
Summary: [Workbench] Platform icons are ignored if they are too large
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted
: 84601 (view as bug list)
Depends on: 97506
Blocks:
  Show dependency tree
 
Reported: 2001-10-11 14:23 EDT by Eduardo Pereira CLA
Modified: 2019-11-14 03:15 EST (History)
3 users (show)

See Also:


Attachments
debug version of Program (10.99 KB, patch)
2002-10-18 13:40 EDT, Christophe Cornu CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo Pereira CLA 2001-10-11 14:23:51 EDT
Program icons are not shown in the external editors dialog.

	1) Open Preferences->Workbench->File Editors->Select *.txt
	2) Add -> Extenal editor

	See that the icons that apear in the dialog are all the same.
	The icon of the executable is not being showed.

NOTES:
	EJP (9/21/2001 1:53:16 PM)
		See: 1GKEYOE: SWT:WIN2000 - Can't launch external editors.
		The icons have vars like %SystemRoot% and %Program files%
		on its path name.
Comment 1 DJ Houghton CLA 2001-10-29 16:42:17 EST
PRODUCT VERSION:
	Win2000 - Eclipse Build 136.

Comment 2 Eduardo Pereira CLA 2002-04-23 16:58:27 EDT
See bug 4842
Comment 3 Veronika Irvine CLA 2002-09-10 14:49:32 EDT
Error with Program class. Reassigning to Felipe.
Comment 4 Felipe Heidrich CLA 2002-09-11 10:24:16 EDT
Works for me, the icons are there.

Eduardo, please reopen this PR you still can reproduce it.
Comment 5 Eduardo Pereira CLA 2002-10-15 10:34:07 EDT
Still a problem.
Comment 6 Felipe Heidrich CLA 2002-10-15 11:05:07 EDT
Christophe Cornu is working in something related, I hope he can help you
Comment 7 Christophe Cornu CLA 2002-10-15 11:16:32 EDT
Eduardo:

Can you look at your registry for the following key:
HKEY_CLASSES_ROOT\txtfile\DefaultIcon\(Default)
Mine is, can you verify yours?
%SystemRoot%\system32\shell32.dll,-152

Open a dos console and expand the %SystemRoot%:
C:\>echo %SystemRoot%
Mine is:
C:\WINDOWS
What is yours?
Comment 8 Eduardo Pereira CLA 2002-10-15 11:25:13 EDT
The same.
Comment 9 Christophe Cornu CLA 2002-10-18 13:40:27 EDT
Created attachment 2233 [details]
debug version of Program
Comment 10 Christophe Cornu CLA 2002-10-18 13:45:13 EDT
On Eduardo's machine, the returned ImageData is 20*20 instead of the more 
common one 16*16. The icon itself is well formed and can be displayed 
correctly (use Program.java for testing). There does not appear to be anything 
wrong at this level.

The UI code later decides to discard the ImageData because its size is greater 
than the one of their default icon (16*16).

Moving PR to UI.
Comment 11 Eduardo Pereira CLA 2002-11-25 16:15:51 EST
The image size is dependent on the font on windows. If I use Large Fonts (125%) 
the icon is 20x20. If I use Small Fonts (normal) then the icon is 16X16.

We have to following in ExternalProgramIconDescriptor
//The images in GNOME are too big. Scaling them does not give nice result so 
return defaultImage;
if(data.height > defaultImage.height || data.width > defaultImage.width)
   return defaultImage;
		
Comment 12 Billy Biggs CLA 2005-05-31 11:05:33 EDT
This is causing platform icons to not be used on Linux-GTK for many file types
where icons are available.

The reason the icons look bad is because there is no suitable scaling algorithm
for large icons.  I filed bug 97506 which describes the problem with
ImageData.scaledTo().
Comment 13 Tod Creasey CLA 2007-06-13 16:38:05 EDT
There are currently no plans to work on this but I would be happy to look at a contribution.
Comment 14 John Arthorne CLA 2011-08-10 16:36:40 EDT
*** Bug 84601 has been marked as a duplicate of this bug. ***
Comment 15 Lars Vogel CLA 2019-11-14 03:15:56 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.