Skip to content

Commit 59a47de

Browse files
Michael5601HannesWell
authored andcommitted
disabled icon logic
1 parent 503cfd2 commit 59a47de

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

bundles/org.eclipse.jface/src/org/eclipse/jface/resource/URLImageDescriptor.java

+23-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,23 @@ public URLImageDataProvider(String url) {
9595
public ImageData getImageData(int zoom) {
9696
return URLImageDescriptor.getImageData(url, zoom);
9797
}
98+
//
99+
// @Override
100+
// public ImageData getCustomizedImageData(int zoom, int flag) {
101+
// return URLImageDescriptor.getCustomizedImageData(url, zoom, flag);
102+
// }
98103

104+
// @Override
105+
// public boolean supportsRasterizationFlag(int flag) {
106+
// boolean supportsFlag = flag == SWT.IMAGE_DISABLE || flag == SWT.IMAGE_GRAY || flag == SWT.IMAGE_COPY;
107+
// URL tempURL = getURL(url);
108+
// if (tempURL != null) {
109+
// if (tempURL.toString().endsWith(".svg") && supportsFlag) { //$NON-NLS-1$
110+
// return true;
111+
// }
112+
// }
113+
// return false;
114+
// }
99115
}
100116

101117
private static long cumulativeTime;
@@ -180,11 +196,11 @@ private static ImageData getImageData(URL url) {
180196
return result;
181197
}
182198

183-
// private static ImageData getImageData(URL url, int zoom) {
199+
// private static ImageData getImageData(URL url, int zoom, int flag) {
184200
// ImageData result = null;
185201
// try (InputStream in = getStream(url)) {
186202
// if (in != null) {
187-
// result = new ImageData(in, zoom);
203+
// result = new ImageData(in, zoom, flag);
188204
// }
189205
// } catch (SWTException e) {
190206
// if (e.code != SWT.ERROR_INVALID_IMAGE) {
@@ -195,6 +211,11 @@ private static ImageData getImageData(URL url) {
195211
// Policy.getLog().log(new Status(IStatus.ERROR, Policy.JFACE, e.getLocalizedMessage(), e));
196212
// }
197213
// return result;
214+
// }
215+
//
216+
// private static ImageData getCustomizedImageData(String url, int zoom, int flag) {
217+
// URL tempURL = getURL(url);
218+
// return getImageData(tempURL, zoom, flag);
198219
// }
199220

200221
/**

0 commit comments

Comments
 (0)