From fd0642bea47ddd2cf63d0170a3198515795f237e Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 26 Jan 2015 13:55:22 +0100 Subject: [PATCH] Fixed issue with tray icon size (too large) in windows --- src/dorkbox/util/tray/SystemTray.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dorkbox/util/tray/SystemTray.java b/src/dorkbox/util/tray/SystemTray.java index 328f9e2..033c2c1 100644 --- a/src/dorkbox/util/tray/SystemTray.java +++ b/src/dorkbox/util/tray/SystemTray.java @@ -54,7 +54,7 @@ public abstract class SystemTray { protected static final Logger logger = LoggerFactory.getLogger(SystemTray.class); /** - * Size of the icon WHEN IT'S IN THE TRAY + * Size of the tray, so that the icon can properly scale based on OS. (if it's not exact) */ public static int TRAY_SIZE = 22; @@ -67,6 +67,11 @@ public abstract class SystemTray { private static Class trayType; static { + if (OS.isWindows()) { + // the tray icon size in windows is DIFFERENT than on Linux (TODO: test on mac). + TRAY_SIZE -= 4; + } + if (OS.isLinux()) { GtkSupport.init(); if (GtkSupport.isSupported) {