Skip to content

Commit 71906e5

Browse files
ptiefvikapte
authored andcommitted
regard external program images if zoom value is > 100% and removed
deprecated method Signed-off-by: ptief <[email protected]>
1 parent aeb1ca4 commit 71906e5

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/ExternalProgramImageDescriptor.java

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -62,29 +62,12 @@ public Image getImage() {
6262
return createImage();
6363
}
6464

65-
/**
66-
* Returns an SWT Image that is described by the information in this descriptor.
67-
* Each call returns a new Image.
68-
*/
6965
@Override
70-
public ImageData getImageData() {
71-
ImageData data = null;
72-
ImageData defaultImage = WorkbenchImages.getImageDescriptor(ISharedImages.IMG_OBJ_FILE).getImageData();
73-
if (defaultImage == null) {
74-
return null;
66+
public ImageData getImageData(int zoom) {
67+
if (program != null && program.getImageData() != null) {
68+
return program.getImageData();
7569
}
76-
77-
if (program == null || ((data = program.getImageData()) == null)) {
78-
return defaultImage;
79-
}
80-
81-
// The images in GNOME are too big. Scaling them does not give nice result so
82-
// return defaultImage;
83-
if (data.height > defaultImage.height || data.width > defaultImage.width) {
84-
return defaultImage;
85-
}
86-
87-
return data;
70+
return WorkbenchImages.getImageDescriptor(ISharedImages.IMG_OBJ_FILE).getImageData(zoom);
8871
}
8972

9073
/**

0 commit comments

Comments
 (0)