diff --git a/src/main/java/com/sparrowwallet/sparrow/AppServices.java b/src/main/java/com/sparrowwallet/sparrow/AppServices.java index d33415b0..930136fb 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppServices.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppServices.java @@ -92,6 +92,8 @@ public class AppServices { private TrayManager trayManager; + private static Image windowIcon; + private static final BooleanProperty onlineProperty = new SimpleBooleanProperty(false); private ExchangeSource.RatesService ratesService; @@ -498,7 +500,7 @@ public class AppServices { stage.setMinWidth(650); stage.setMinHeight(708); stage.setScene(scene); - stage.getIcons().add(new Image(MainApp.class.getResourceAsStream("/image/sparrow-large.png"))); + stage.getIcons().add(getWindowIcon()); appController.initializeView(); stage.show(); @@ -509,6 +511,14 @@ public class AppServices { } } + private static Image getWindowIcon() { + if(windowIcon == null) { + windowIcon = new Image(MainApp.class.getResourceAsStream("/image/sparrow-icon.png")); + } + + return windowIcon; + } + public static boolean isReducedWindowHeight(Node node) { return (node.getScene() != null && node.getScene().getWindow().getHeight() < 768); } @@ -694,7 +704,7 @@ public class AppServices { public static void setStageIcon(Window window) { Stage stage = (Stage)window; - stage.getIcons().add(new Image(AppServices.class.getResourceAsStream("/image/sparrow-large.png"))); + stage.getIcons().add(getWindowIcon()); if(stage.getScene() != null && Config.get().getTheme() == Theme.DARK) { stage.getScene().getStylesheets().add(AppServices.class.getResource("darktheme.css").toExternalForm()); diff --git a/src/main/resources/image/sparrow-icon.png b/src/main/resources/image/sparrow-icon.png new file mode 100644 index 00000000..55e794af Binary files /dev/null and b/src/main/resources/image/sparrow-icon.png differ diff --git a/src/main/resources/image/sparrow-icon@2x.png b/src/main/resources/image/sparrow-icon@2x.png new file mode 100644 index 00000000..0e3edac8 Binary files /dev/null and b/src/main/resources/image/sparrow-icon@2x.png differ