diff options
| author | Niraj Modi | 2017-05-04 16:43:08 +0000 |
|---|---|---|
| committer | Niraj Modi | 2017-05-05 08:17:23 +0000 |
| commit | fd3aa12a5686e7535f4ec79d07a300e654c351bd (patch) | |
| tree | 96480b1c71f5d1fed29af3890b630c8371302127 | |
| parent | 2e44c6c70a491bff16853c167c981e23c2eaebd8 (diff) | |
| download | eclipse.platform.swt-fd3aa12a5686e7535f4ec79d07a300e654c351bd.tar.gz eclipse.platform.swt-fd3aa12a5686e7535f4ec79d07a300e654c351bd.tar.xz eclipse.platform.swt-fd3aa12a5686e7535f4ec79d07a300e654c351bd.zip | |
Bug 8232: [HiDPI][Program] Losing icons for External programs at higher
OS zoom level
Change-Id: Ic38548722eb3f6f8dbc867e4b19ebc0a370f6626
Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java index 79a9d88bf0..c6e140c9ca 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java @@ -14,7 +14,6 @@ import java.util.*; import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; -import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.win32.*; /** @@ -395,7 +394,8 @@ public ImageData getImageData () { OS.SHGetFileInfo (pszPath, OS.FILE_ATTRIBUTE_NORMAL, shfi, SHFILEINFO.sizeof, flags); if (shfi.hIcon != 0) { Image image = Image.win32_new (null, SWT.ICON, shfi.hIcon); - ImageData imageData = image.getImageData (DPIUtil.getDeviceZoom ()); + /* Fetch the ImageData at 100% zoom and return */ + ImageData imageData = image.getImageData (); image.dispose (); return imageData; } @@ -422,7 +422,8 @@ public ImageData getImageData () { OS.ExtractIconEx (lpszFile, nIconIndex, phiconLarge, phiconSmall, 1); if (phiconSmall [0] == 0) return null; Image image = Image.win32_new (null, SWT.ICON, phiconSmall [0]); - ImageData imageData = image.getImageData (DPIUtil.getDeviceZoom ()); + /* Fetch the ImageData at 100% zoom and return */ + ImageData imageData = image.getImageData (); image.dispose (); return imageData; } |
