提交 43b8095d 编写于 作者: P pchelko

7124250: [macosx] JOptionPane dialogs show wrong icons

Reviewed-by: serb, leonidr
上级 de1bd584
......@@ -57,7 +57,7 @@ public class AquaImageFactory {
return new IconUIResource(new AquaIcon.CachingScalingIcon(kAlertIconSize, kAlertIconSize) {
Image createImage() {
return getThisApplicationsIcon(kAlertIconSize, kAlertIconSize);
return getGenericJavaIcon();
}
});
}
......@@ -83,24 +83,6 @@ public class AquaImageFactory {
return getAppIconCompositedOn(lockIcon);
}
static Image getThisApplicationsIcon(final int width, final int height) {
final String path = getPathToThisApplication();
if (path == null) {
return getGenericJavaIcon();
}
if (path.endsWith("/Home/bin")) {
return getGenericJavaIcon();
}
if (path.startsWith("/usr/bin")) {
return getGenericJavaIcon();
}
return AquaUtils.getCImageCreator().createImageOfFile(path, height, width);
}
static Image getGenericJavaIcon() {
return java.security.AccessController.doPrivileged(new PrivilegedAction<Image>() {
public Image run() {
......@@ -144,7 +126,7 @@ public class AquaImageFactory {
final Icon smallAppIconScaled = new AquaIcon.CachingScalingIcon(
kAlertSubIconSize, kAlertSubIconSize) {
Image createImage() {
return getThisApplicationsIcon(kAlertSubIconSize, kAlertSubIconSize);
return getGenericJavaIcon();
}
};
......@@ -528,4 +510,4 @@ public class AquaImageFactory {
public static Color getSelectionInactiveForegroundColorUIResource() {
return new SystemColorProxy(LWCToolkit.getAppleColor(LWCToolkit.INACTIVE_SELECTION_FOREGROUND_COLOR));
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册