mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-13 20:05:31 +00:00
7124250: [macosx] JOptionPane dialogs show wrong icons
Reviewed-by: serb, leonidr
This commit is contained in:
parent
6b14d69b60
commit
7059ba15c3
@ -55,7 +55,7 @@ public class AquaImageFactory {
|
||||
|
||||
return new IconUIResource(new AquaIcon.CachingScalingIcon(kAlertIconSize, kAlertIconSize) {
|
||||
Image createImage() {
|
||||
return getThisApplicationsIcon(kAlertIconSize, kAlertIconSize);
|
||||
return getGenericJavaIcon();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -81,24 +81,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() {
|
||||
@ -142,7 +124,7 @@ public class AquaImageFactory {
|
||||
final Icon smallAppIconScaled = new AquaIcon.CachingScalingIcon(
|
||||
kAlertSubIconSize, kAlertSubIconSize) {
|
||||
Image createImage() {
|
||||
return getThisApplicationsIcon(kAlertSubIconSize, kAlertSubIconSize);
|
||||
return getGenericJavaIcon();
|
||||
}
|
||||
};
|
||||
|
||||
@ -514,4 +496,4 @@ public class AquaImageFactory {
|
||||
public static Color getSelectionInactiveForegroundColorUIResource() {
|
||||
return new SystemColorProxy(LWCToolkit.getAppleColor(LWCToolkit.INACTIVE_SELECTION_FOREGROUND_COLOR));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user