From 70606f208bef66b51afd68f7b27f9e0d504d036a Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 4 May 2018 13:32:30 -0400 Subject: [PATCH] proper icons for macos --- src/images/icon-highlight.png | Bin 0 -> 292 bytes src/images/icon-highlight@2x.png | Bin 0 -> 438 bytes src/images/icon-template.png | Bin 0 -> 292 bytes src/images/icon-template@2x.png | Bin 0 -> 438 bytes src/main/tray.main.ts | 17 ++++++++++++----- 5 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 src/images/icon-highlight.png create mode 100644 src/images/icon-highlight@2x.png create mode 100644 src/images/icon-template.png create mode 100644 src/images/icon-template@2x.png diff --git a/src/images/icon-highlight.png b/src/images/icon-highlight.png new file mode 100644 index 0000000000000000000000000000000000000000..ffae96071197c49fa09ff7e3b533b3952b78899f GIT binary patch literal 292 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}Y=BRQE0F$AGZ3it`zg=@xso8i zU1)t+uoH7>vlzFue~Oo)FA)x#{r%Tb^yVm#IFI7T)!nA^BQakZTw`UHx3vIVCg!0M6u~ Avj6}9 literal 0 HcmV?d00001 diff --git a/src/images/icon-highlight@2x.png b/src/images/icon-highlight@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..3b4c7966cce4aa73c368a302a33167cd92e6289d GIT binary patch literal 438 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyT>(BJu0Z<#-~ivuGkSrp(Jcw` z3ua(sVqsXWsdHDXUb|`QzT;=kUB7wj(UX_oOA5ct0IH1eba4!k2;X}0C}V>G zgY!lI!g9??e~&+5U=>qX{)Cln?@ESsyP~t#UK3Ahkbn5&0M7+GffWoMG8J>37+!Jv ztdwE!(bxRuZYsC^$t9K4Jm#0nR3AwT@A}Phw1)SPe68$LkY7Dr{an^LB{Ts5E96FY literal 0 HcmV?d00001 diff --git a/src/images/icon-template@2x.png b/src/images/icon-template@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..1affdbd1a840cc9b2c4c2f8bf9e7a81d017492a4 GIT binary patch literal 438 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyT>(BJu0VQ_0AVH$eV|ixOM?7@ z85o&ZSlM`_W#pCBjZLgW!(!tLi%Xi8ZQpb7@TrTJuU@}(=gG5|?>~P2`u+D`Rqd-4 zK#l7>T^vI!PQN{OT&T%G#O0!!fGG2`Im~Q({{OGmlW<8%dw*zmm1*rNhe>Uk*Df_~ zlCfUG_TUU#Uif70mS=&}?SHsVh&U)KRJ<OU$<3)MzU3bpGv7NBJAi zcUy^GV0*EzF)d!ft1)t;w#5{O_nb0+_!oSLX}BfwKx9=&#TmzJ=7K-Bmi|&=E@lub z4gGZN==?sLn^}3AD{oIw)~`FD{OyTe$KwTmJ~1r{jjGppf1?u=`kt Promise) { if (process.platform === 'win32') { - this.iconPath = path.join(__dirname, '/images/icon.ico'); + this.icon = path.join(__dirname, '/images/icon.ico'); + } else if (process.platform === 'darwin') { + const nativeImage = NativeImage.createFromPath(path.join(__dirname, '/images/icon-template.png')); + nativeImage.setTemplateImage(true); + this.icon = nativeImage; } else { - this.iconPath = path.join(__dirname, '/images/icon.png'); + this.icon = path.join(__dirname, '/images/icon.png'); } } @@ -38,7 +45,7 @@ export class TrayMain { } private handleHideEvent() { - this.tray = new Tray(this.iconPath); + this.tray = new Tray(this.icon); this.tray.setToolTip(this.appName); this.tray.on('click', () => {