From ff0b4c46d154540e1b482d7bbe74d04c0fd831ae Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 13 Nov 2014 21:12:49 +0100 Subject: [PATCH] Use separate icons for windows and linux --- .../java/io/bitsquare/app/gui/BitsquareApp.java | 14 ++++++++++++-- src/main/java/io/bitsquare/gui/SystemTray.java | 9 ++++++--- ...icon_alt.png => system_tray_icon_windows.png} | Bin src/main/resources/images/taskbar_icon.png | Bin 0 -> 8995 bytes 4 files changed, 18 insertions(+), 5 deletions(-) rename src/main/resources/images/{system_tray_icon_alt.png => system_tray_icon_windows.png} (100%) create mode 100644 src/main/resources/images/taskbar_icon.png diff --git a/src/main/java/io/bitsquare/app/gui/BitsquareApp.java b/src/main/java/io/bitsquare/app/gui/BitsquareApp.java index 9cc7c2e23f..4ad164e288 100644 --- a/src/main/java/io/bitsquare/app/gui/BitsquareApp.java +++ b/src/main/java/io/bitsquare/app/gui/BitsquareApp.java @@ -26,6 +26,7 @@ import io.bitsquare.gui.components.Popups; import io.bitsquare.gui.util.ImageUtil; import io.bitsquare.persistence.Persistence; import io.bitsquare.user.User; +import io.bitsquare.util.Utilities; import com.google.common.base.Throwables; @@ -122,8 +123,17 @@ public class BitsquareApp extends Application { primaryStage.setScene(scene); primaryStage.setMinWidth(75); primaryStage.setMinHeight(50); - primaryStage.getIcons().add(new Image(getClass().getResourceAsStream( - ImageUtil.isRetina() ? "/images/window_icon@2x.png" : "/images/window_icon.png"))); + + // on windows the title icon is also used as task bar icon in a larger size + // on Linux no title icon is supported but also a large task bar icon is derived form that title icon + String iconPath; + if (Utilities.isOSX()) + iconPath = ImageUtil.isRetina() ? "/images/window_icon@2x.png" : "/images/window_icon.png"; + else + iconPath = "/images/taskbar_icon.png"; + + if (iconPath != null) + primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(iconPath))); // make the UI visible diff --git a/src/main/java/io/bitsquare/gui/SystemTray.java b/src/main/java/io/bitsquare/gui/SystemTray.java index 8d670322af..b73fea6c55 100644 --- a/src/main/java/io/bitsquare/gui/SystemTray.java +++ b/src/main/java/io/bitsquare/gui/SystemTray.java @@ -42,8 +42,9 @@ public class SystemTray { private static final String ICON_HI_RES = "/images/system_tray_icon@2x.png"; private static final String ICON_LO_RES = "/images/system_tray_icon.png"; - private static final String ICON_ALT = "/images/system_tray_icon_alt.png"; - + private static final String ICON_WINDOWS = "/images/system_tray_icon_windows.png"; + private static final String ICON_LINUX = "/images/system_tray_icon_linux.png"; + private static final String SHOW_WINDOW_LABEL = "Show exchange window"; private static final String HIDE_WINDOW_LABEL = "Hide exchange window"; @@ -82,8 +83,10 @@ public class SystemTray { String path; if (Utilities.isOSX()) path = ImageUtil.isRetina() ? ICON_HI_RES : ICON_LO_RES; + else if (Utilities.isWindows()) + path = ICON_WINDOWS; else - path = ICON_ALT; + path = ICON_LINUX; try { BufferedImage trayIconImage = ImageIO.read(getClass().getResource(path)); diff --git a/src/main/resources/images/system_tray_icon_alt.png b/src/main/resources/images/system_tray_icon_windows.png similarity index 100% rename from src/main/resources/images/system_tray_icon_alt.png rename to src/main/resources/images/system_tray_icon_windows.png diff --git a/src/main/resources/images/taskbar_icon.png b/src/main/resources/images/taskbar_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..6fd8b11be52e86aab0e3427f13a5a3fdc38b492b GIT binary patch literal 8995 zcmeHtcTiN@@-8`p2ofadkb}SkKw!w3AxRdHG|Y^|nIQ~8k|YU|b5anHC?Ywl!~p~( zh-5@1NKPs!2)yy!d(ZEkSM{py`Q!cZs?M&R*6MF}_xe`vTD`k=tdXHMJq-s95fKqR zOh?0naEd4Hgr|v!6qNlv;0QMq4&aD#a=|F_?zO+>1-Kv;d2dS_ zfDAm;QO+(p0bVH607ElGfEz*%$*ZhHqu>uEC_tldaDYGB9per4SLFReFO+cqyBo+0 z_ydA-Q{?@ZQnv($9Vsn zF9LHwf4Bz_ECB-k?_eb2PppTJm-`=XAQ3>6I|_}$;JgWV@L%vA&R87Q+Zp?RG4ZGP ze+&_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