Browse Source

tray changes for windows

terminal
Craig Raw 4 years ago
parent
commit
4a7b0b20ad
  1. 13
      src/main/java/com/sparrowwallet/sparrow/control/TrayManager.java
  2. BIN
      src/main/resources/image/sparrow-black-small.png
  3. BIN
      src/main/resources/image/sparrow-black-small@2x.png
  4. BIN
      src/main/resources/image/sparrow-black-small@3x.png

13
src/main/java/com/sparrowwallet/sparrow/control/TrayManager.java

@ -31,9 +31,16 @@ public class TrayManager {
try {
List<Image> imgList = new ArrayList<>();
imgList.add(ImageIO.read(getClass().getResource("/image/sparrow-white-small.png")));
imgList.add(ImageIO.read(getClass().getResource("/image/sparrow-white-small@2x.png")));
imgList.add(ImageIO.read(getClass().getResource("/image/sparrow-white-small@3x.png")));
if(org.controlsfx.tools.Platform.getCurrent() == org.controlsfx.tools.Platform.WINDOWS) {
imgList.add(ImageIO.read(getClass().getResource("/image/sparrow-black-small.png")));
imgList.add(ImageIO.read(getClass().getResource("/image/sparrow-black-small@2x.png")));
imgList.add(ImageIO.read(getClass().getResource("/image/sparrow-black-small@3x.png")));
} else {
imgList.add(ImageIO.read(getClass().getResource("/image/sparrow-white-small.png")));
imgList.add(ImageIO.read(getClass().getResource("/image/sparrow-white-small@2x.png")));
imgList.add(ImageIO.read(getClass().getResource("/image/sparrow-white-small@3x.png")));
}
BaseMultiResolutionImage mrImage = new BaseMultiResolutionImage(imgList.toArray(new Image[0]));
this.trayIcon = new TrayIcon(mrImage, "Sparrow", popupMenu);

BIN
src/main/resources/image/sparrow-black-small.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

BIN
src/main/resources/image/sparrow-black-small@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

BIN
src/main/resources/image/sparrow-black-small@3x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Loading…
Cancel
Save