|
|
@ -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()); |
|
|
|