From 8667c0715a0666b1a3fac139aa7c42a8b5e704a3 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 6 Mar 2018 14:36:01 +0700 Subject: [PATCH] Use @2x window icons --- source/net/filebot/ResourceManager.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/source/net/filebot/ResourceManager.java b/source/net/filebot/ResourceManager.java index 2d17ad3f..d8ec436d 100644 --- a/source/net/filebot/ResourceManager.java +++ b/source/net/filebot/ResourceManager.java @@ -4,7 +4,6 @@ import static java.util.Collections.*; import static java.util.stream.Collectors.*; import java.awt.Image; -import java.awt.Toolkit; import java.awt.image.BaseMultiResolutionImage; import java.net.URL; import java.util.HashMap; @@ -35,22 +34,17 @@ public final class ResourceManager { } public static Stream getApplicationIconResources() { - return Stream.of("window.icon.large", "window.icon.medium", "window.icon.small").map(ResourceManager::getImageResource); + return Stream.of("window.icon16", "window.icon64").map(ResourceManager::getImageResource); } public static List getApplicationIconImages() { - return getApplicationIconResources().map(ResourceManager::getToolkitImage).collect(toList()); + return Stream.of("window.icon16", "window.icon64").map(ResourceManager::getMultiResolutionImageResource).map(ResourceManager::getMultiResolutionImage).collect(toList()); } public static Icon getFlagIcon(String languageCode) { return getIcon("flags/" + languageCode); } - private static Image getToolkitImage(URL resource) { - // load sun.awt.image.ToolkitImage or sun.awt.image.MultiResolutionToolkitImage (via @2x convention) - return Toolkit.getDefaultToolkit().getImage(resource); - } - private static Image getMultiResolutionImage(URL[] resource) { try { Image[] image = new Image[resource.length];