From 4a7b0b20ad8272aa8a976ae21d56d2aa940c2e0e Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 7 Apr 2021 09:45:52 +0200 Subject: [PATCH] tray changes for windows --- .../sparrow/control/TrayManager.java | 13 ++++++++++--- src/main/resources/image/sparrow-black-small.png | Bin 0 -> 550 bytes .../resources/image/sparrow-black-small@2x.png | Bin 0 -> 975 bytes .../resources/image/sparrow-black-small@3x.png | Bin 0 -> 1921 bytes 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 src/main/resources/image/sparrow-black-small.png create mode 100644 src/main/resources/image/sparrow-black-small@2x.png create mode 100644 src/main/resources/image/sparrow-black-small@3x.png diff --git a/src/main/java/com/sparrowwallet/sparrow/control/TrayManager.java b/src/main/java/com/sparrowwallet/sparrow/control/TrayManager.java index ed1118ec..2e51d2fa 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/TrayManager.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/TrayManager.java @@ -31,9 +31,16 @@ public class TrayManager { try { List 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); diff --git a/src/main/resources/image/sparrow-black-small.png b/src/main/resources/image/sparrow-black-small.png new file mode 100644 index 0000000000000000000000000000000000000000..69e9e2d981553f5d868d025059c6d739da750356 GIT binary patch literal 550 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uuz(rC1}QWNE&K$eWHMd+Lx40B zNDK%#fLH@cgV>*o7&m@WMB&7z!BC16gA}f5OZp6?WHMd+Lx40B zNDK%BfLH@c1KEt1Chn?K0@Cw5T^vIqIQLxf*Ki3GIsS2`;;H>POEgjwQx(M)<#=@U zwkA1iq&BvSNNaA|uyKRCv1Y34x1eujVqH(pyPb6UH@*J;{AX7SZJ+fT7Qec@`~5xR z=l6EL-zUzcDt>dx_as?S4&~&9C!-3Qt7R52N1pJQVt86)+XuPjM@y8&Gx>dudf4|I ziax^qmUW79)0Wn<1ew(pP1_mX?{bc3E}9VXWMZt)198?TK2HDdy=&Oc5UYQ&y@sXF z&uH-qcg4DHE4J?obGHlcej9nLTTp}TWYjU^XMxQ@Kjywu`sH50RUY(xU-uk`^rX%s z#V-n0c5EwW)(T+VA1k@^{@e?D=c~E*>n8S0+}Lft!}ZI$Z0qPi-u(1g8S;nEZvW2Q z^ZM{qgJ&mp9Ma8U++KU6Lc}@aFxMTK>icIZ9^6p5{Ql}D*4*C{{}|t}yL~P1np6LJ z!M7Khv;>b$zmOPxMDa`K*4CiR*B8${u!;-rzU9WhPq%5``S&$F*;_ z>xa@-U#pn?61xAESNHy^GTCRn@LZjW)s*_kE3Bp8AF1tdvjaxh|NmRg2u=aUR5~c8 zwqCXOU`muYUiel%tO>|x5z=5`+o>9q;Or7@vCU1FmyJ*F(W``LZ$Xor5zf)c7oxnQ z75XkJxdgb(x<9`}p{TU<{cUFXcYCVuKd*ehw>qAg@%xMCpR~3W_WN_|ot$_`qRp@+ zzSZh!0rP%l%jNHxYTV^*C*L?Ic<;mXgKI9_i}IPI*{pQ$q3HzcTRsP?-b~uaxt>uZ z!#HVo)s&X1^>IhDw_M!Ke<B0!li!NyztF2Y{a$xP22+&kts`C+yk@o)W=Lj6-Mv;n@Aa%#5?Uve zdQ^3iMcfR%-)rw!`_t;W_`(3k+K*MQOfz=NHeBTDnDjtO{>8kq=YM)$|GFR0vS8+n z<9DuGvi~=9yskATY436Ncey*3T;Ha9Y@v$r4QJW)7Zl_Qn@r{`fBxma6Z6I0SH5(e h3%&8;?xp?0x#3SMHu{Kn?Er>7gQu&X%Q~loCIE8Dp9KH_ literal 0 HcmV?d00001 diff --git a/src/main/resources/image/sparrow-black-small@3x.png b/src/main/resources/image/sparrow-black-small@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..bf0306d914298adfd3c9727d1e0b0b6a91ee5245 GIT binary patch literal 1921 zcmV-{2Y&d8P)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91K%fHv1ONa40RR91KmY&$07g+lumAu69BD*PQ~&?~0ssI200000AOHXW zC;$KeAOHXWAOHXZ-G$NB;s5{xsYygZRCod8m|KWVQ5eVP3}#%z7}F$iB8H4aa%qx= za>*@um?TfUcrhU%g;7c(d6_0W$R!?-Qb?GK!i@2N6lt0f6S*|GjqBj|*IBjO%{gc7 zIqP)hocZe4UTf`de`|eff9qRo@2srk%MiNQ1r4wiLeOKRAD)hcWzY(rVITB|9x)LM zar7@VL2ab0`c;?&*^sfKH#`~cf}Hl#LfabX4H+kLejF$Q=0P+30ska?r)@oC+>%h@ z+aGbbhU-E25UKkoLG?-qLodh}(Hg%4#^JA?vT5^P?{mKtav)=50-n^tFYr1Wt^5hS zjW86njM7&6F!Iqb2BtwZ{D5eV``b^TTLfvFAhq{j1UYsYwnKfS?sqm?{So>~qB={Y zohX^Dgg0Ou{6@L6oxt4h?5bU26XZiumxSI}9=Mk27_0@Y?V!$kC*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