From 65f25f58df0df1d8a90625f3944155235a9d20be Mon Sep 17 00:00:00 2001 From: clemenso Date: Thu, 20 Aug 2009 16:33:43 +0000 Subject: 24x24 icon for webstart 16x16 tray icon git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@449 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../src/main/java/at/gv/egiz/bku/webstart/Launcher.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'BKUWebStart/src/main/java') diff --git a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Launcher.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Launcher.java index ca40ddc0..d216fdc4 100644 --- a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Launcher.java +++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Launcher.java @@ -171,9 +171,15 @@ public class Launcher implements BKUControllerInterface, ActionListener { // get the SystemTray instance SystemTray tray = SystemTray.getSystemTray(); log.debug("TrayIcon size: " + tray.getTrayIconSize()); - String iconResource = (tray.getTrayIconSize().height < 25) - ? TRAYICON_RESOURCE + "24.png" - : TRAYICON_RESOURCE + "32.png"; + + String iconResource; + if (tray.getTrayIconSize().height < 17) { + iconResource = TRAYICON_RESOURCE + "16.png"; + } else if (tray.getTrayIconSize().height < 25) { + iconResource = TRAYICON_RESOURCE + "24.png"; + } else { + iconResource = TRAYICON_RESOURCE + "32.png"; + } Image image = ImageIO.read(Launcher.class.getClassLoader().getResourceAsStream(iconResource)); PopupMenu popup = new PopupMenu(); -- cgit v1.2.3