Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 8232

Summary: [HiDPI][Program] Losing icons for External programs at higher OS zoom level
Product: [Eclipse Project] Platform Reporter: Tod Creasey <Tod_Creasey>
Component: SWTAssignee: Niraj Modi <niraj.modi>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: grant_gayed, kevin, loskutov, lshanmug, markus.kell.r, mistria, niraj.modi, sptaszkiewicz, sravankumarl
Version: 2.0   
Target Milestone: 4.7 M7   
Hardware: PC   
OS: Windows All   
See Also: https://git.eclipse.org/r/96421
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=fd3aa12a5686e7535f4ec79d07a300e654c351bd
Whiteboard:
Bug Depends on:    
Bug Blocks: 495269, 516390    
Attachments:
Description Flags
screenshot of the dialog on windows 10, 150% zoom none

Description Tod Creasey CLA 2002-01-23 14:14:20 EST
When we are in Windows Standard Extra Large mode we lose the icons for the 
external programs. These is most likely an SWT problem as it appears that it is 
the icon lookup that is failing.

STEPS
1) Switch your Display settings to Windows Standard Extra  Large
2) Open the File Editors preference page
3) Select a pattern
4) Select the second Add button
5) Select the External program - all the entries will have the default icon
Comment 1 Tod Creasey CLA 2002-03-06 09:40:33 EST
Not required to satisfy section 508. Defer.
Comment 2 Randy Giffen CLA 2002-08-09 12:02:12 EDT
Reopen to investigate
Comment 3 Eduardo Pereira CLA 2002-09-05 16:13:08 EDT
Moving to SWT for comment. The icons for the external program are from the API 
in Program.
Comment 4 Mike Wilson CLA 2002-09-06 11:09:59 EDT
Sorry, Sridhar. That was a bogus assignment. Should have been SN.
Comment 5 Tod Creasey CLA 2004-03-05 10:35:41 EST
This isn't just an accessibility issue - we lose them at regular fonts too.
Comment 6 Tod Creasey CLA 2004-03-09 10:18:53 EST
Is currently working on XP
Comment 7 Steve Northover CLA 2004-03-09 10:33:13 EST
Verified that it still fails on 2000.
Comment 8 Tod Creasey CLA 2006-06-14 09:07:53 EDT
*** Bug 146951 has been marked as a duplicate of this bug. ***
Comment 9 Steve Northover CLA 2008-05-29 12:01:23 EDT
Grant, we've changed Program quite a bit over the years, does this still fail in Windows 2000?
Comment 10 Grant Gayed CLA 2008-05-29 15:27:56 EDT
yes it still happens, a generic image is shown for all of the file types
Comment 11 Kevin G. CLA 2015-12-30 14:04:23 EST
This issue is still occurring, reproduced in latest Kepler download, and latest Mars download, seeing it happen on every windows OS we have tested it on, specifically windows 7, 8, and 10
Comment 12 Szymon Ptaszkiewicz CLA 2016-05-10 05:26:00 EDT
Reproducible in 4.5.2 and current master. To reproduce on Windows 7, step 1 from comment 0 needs to be performed on the Control Panel > Display page. The other steps are still accurate.
Comment 13 Szymon Ptaszkiewicz CLA 2016-05-10 06:22:14 EDT
Similar to bug 4682 and bug 4835. These could be all duplicates of the same problem.
Comment 14 Szymon Ptaszkiewicz CLA 2016-05-17 12:03:09 EDT
Note that nowadays some PCs may have default value higher than 100% which would cause the problem for Eclipse users right from the beginning. This article mentions 125% as the new default:

http://nvidia.custhelp.com/app/answers/detail/a_id/3153/~/adjusting-windows-display-size%2Fscaling-for-high-dpi%2Fppi-monitors

Markus, this is the bug I mentioned on the status call last week.
Comment 15 Andrey Loskutov CLA 2016-10-02 03:13:41 EDT
Created attachment 264528 [details]
screenshot of the dialog on windows 10, 150% zoom

Still same on 4.6.1 & 4.7.0 head. I'm on Windows 10, 150% zoom, but in Eclipse it should use 100% scale factor - still no icons.
Comment 16 Niraj Modi CLA 2017-05-04 02:53:24 EDT
(In reply to Andrey Loskutov from comment #15)
> Created attachment 264528 [details]
> screenshot of the dialog on windows 10, 150% zoom
> 
> Still same on 4.6.1 & 4.7.0 head. I'm on Windows 10, 150% zoom, but in
> Eclipse it should use 100% scale factor - still no icons.

Yes, this problem still exits on Windows OS zoom level greater than 100%.

With my initial investigation, I can see Program#getImageData() correctly returns the associated image at 100% zoom and but when OS zoom value is greater than 100% it's unable to find an associated program image and that may be the reason some default ICON is shown for all Programs in the list.

One solution I can think of, is to return the same ICON image(i.e. at 100% zoom) even for higher OS zoom level and auto-Scaled version of the 100% ICON images can be shown again the Program in the list. I am trying this approach.
Comment 17 Eclipse Genie CLA 2017-05-04 12:42:53 EDT
New Gerrit change created: https://git.eclipse.org/r/96421
Comment 19 Niraj Modi CLA 2017-05-10 03:08:24 EDT
(In reply to Eclipse Genie from comment #18)
> Gerrit change https://git.eclipse.org/r/96421 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=fd3aa12a5686e7535f4ec79d07a300e654c351bd
> 
Above patch works as expected and now we can an auto-Scaled version of the 100% ICON images is shown at higher OS zoom levels.

Created bug 516390 to investigate and improve the icons quality for External programs at higher OS zoom levels, resolving this bug now.
Comment 20 Niraj Modi CLA 2017-05-10 03:09:31 EDT
Verified fix on Win7 at 200% zoom using Build id: I20170508-2000