From f3b0b521d0e3414dee15fae946b69b1234ebed9f Mon Sep 17 00:00:00 2001 From: Artem Chepurnyi Date: Tue, 23 Apr 2024 21:16:14 +0300 Subject: [PATCH] improvement: Use grayscale tray icon for macOS --- .../resources/MR/images/ic_tray_macos@2x.png | Bin 0 -> 8566 bytes .../kotlin/com/artemchep/keyguard/Main.kt | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 common/src/commonMain/resources/MR/images/ic_tray_macos@2x.png diff --git a/common/src/commonMain/resources/MR/images/ic_tray_macos@2x.png b/common/src/commonMain/resources/MR/images/ic_tray_macos@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..b333b49867776501ad027ebb4f6cd01c3349ae57 GIT binary patch literal 8566 zcmdUVd0f-iw(ky8D6N53d`KC^9*1MY5ClS)N>Qjs1{E?00>KavA%l<*2m-ORTB|}U zJ)mXKN)<^M!aS28El7hP<%B`YBqA6l0VBwiw`0}kefPfUe(w9Dd_IuhZ}0D3(_U-u zwN^NP$lGI+*2h`^fK3O!*mnc~75JzEG&SJI^SFPlz>oKsUmT4A;Qh_YUj+Cudn*8H z&m;UuERvTej>4dshlDbYQ_bUOOo#@+(It)+MJ3MpEoU&0L&K9piA20FBBDF^!`|(PMCNPG+y@;^4D#*uu>8 z6@(S(Wag@5XiD-rWa`FgTnr)1&#TZEIsD6rJ&6$ z;zF1fR_2yUtzH2`DQ|I1c68J$=Aje|Y7~`5rL$rn*6J;md4j=W#GGLKFG#{VJvYNE1b3M z9!qPSrRAScFGgrYSp2_-TH&m$aC`qP6#7kQ2rK0O2o9y-!WhxC5U6qlEhL<3!K81-o9BM`v17zCprR#S4h->=H7|hH*k0uC?DS*MDXS9QAVZ1^D7!2 zREGJk#sC=ZIu}^loyULA_;A0PMcn>R(Y^d{ zw%@EA;+dKKv*24@U5&`EfAX)WG}@=8<-f(>%=_eLms}BSaQ?G>AJJVef5yw+C{0z> zns}U@_#*yV<%`9a9St#OKgnKCfG^ynx$@rn-reU=Mq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vXSM4yBk*FzQ_BMd* z!fLz^Klj+6hShUh0 zvz4Ox)`D_=mhpxnQCP2fUJ0~*C%rKF_?`5E13ThE zWNP4^d{8(Xpv*N?+lrxk^v)H*?*H@|n7F)da%1bt1=_I9#mw$3D265E_Hvl25DA&7 zaLCa7-eVD0OKf{=FJyFz+3^6VlMRBL-n{g|#A=2wGBi>d**e(7eK@IOn6rgPiwj`4 zPwK$B`?BXo)^!lob^!{2)kwt~jKa(^JGjy5<|b0f6hDBN2|I>z>#I?1R4F`v0QOs$ zrVW3fP7X*4gDG7e^Wp;?_!8v1J`3qxYn`hy%eX5*( zeDmdVk$sc8(5o8u0dwrJNU>BJxX^L=Ua5-EE0f@3Y@~91oWz1)Ll>BAvQNtSGT5B~ zJzTbY3wl@)u1s?sM0GVd21|#G%Ooy!EN$3HcJpZUg)8Aw*yTaoS}4t+q_ro*oOvdJ zE$@dZTY;l(+S;I_`Up8LN&YW5u-mb6{7Oq}t;PuXWtwyh>V+x{S6+W#u7^NW{O9uL z5T*L`>D4uDU05%qn}O;4uFHOh<@MIn@?ZQ{X#xto%RJg&G z2jrzN7mgyXv@t3jOQ+6D|Cv$_rlP5m(oyrPYp_dB_MY$?PFQBo_U{sZM)Y$@SeBnD zJ=|}jPNv%xHq~vN z>m^y(kZ3CyJMsbZlj_KqACFEDUzLOSoJ3d-esEA@&8?3>tjv~(_}p;Vs|`mJ7eq7? thHy~%)sy|i`+xOsqy9_M-W5g8v$ZMTkF|eP{%6F2{oebEKPP|r-vLrW8X^Dy literal 0 HcmV?d00001 diff --git a/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt b/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt index ded48e8a..59b0b797 100644 --- a/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt +++ b/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt @@ -43,6 +43,8 @@ import com.artemchep.keyguard.feature.navigation.NavigationController import com.artemchep.keyguard.feature.navigation.NavigationIntent import com.artemchep.keyguard.feature.navigation.NavigationNode import com.artemchep.keyguard.feature.navigation.NavigationRouterBackHandler +import com.artemchep.keyguard.platform.CurrentPlatform +import com.artemchep.keyguard.platform.Platform import com.artemchep.keyguard.platform.lifecycle.LeLifecycleState import com.artemchep.keyguard.res.Res import com.artemchep.keyguard.ui.LocalComposeWindow @@ -226,7 +228,10 @@ fun main() { if (getCloseToTrayState.value) { val trayState = rememberTrayState() Tray( - icon = painterResource(Res.images.ic_keyguard), + icon = when (CurrentPlatform) { + is Platform.Desktop.MacOS -> painterResource(Res.images.ic_tray_macos) + else -> painterResource(Res.images.ic_keyguard) + }, state = trayState, onAction = onWindowOpen, menu = {