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 0000000000..6fd8b11be5 Binary files /dev/null and b/src/main/resources/images/taskbar_icon.png differ