fix: adjusted tray icon size to match linux platform requirements
This commit is contained in:
parent
b77f845cb0
commit
23ef4ab952
@ -30,12 +30,12 @@ export class TrayService {
|
|||||||
tray.setImage(resizedImage)
|
tray.setImage(resizedImage)
|
||||||
} else if (process.platform === 'linux') {
|
} else if (process.platform === 'linux') {
|
||||||
const image = nativeImage.createFromPath(iconPath)
|
const image = nativeImage.createFromPath(iconPath)
|
||||||
const resizedImage = image.resize({ width: 24, height: 24 })
|
const resizedImage = image.resize({ width: 16, height: 16 })
|
||||||
tray.setImage(resizedImage)
|
tray.setImage(resizedImage)
|
||||||
nativeTheme.on('updated', () => {
|
nativeTheme.on('updated', () => {
|
||||||
const newIconPath = nativeTheme.shouldUseDarkColors ? iconLight : iconDark
|
const newIconPath = nativeTheme.shouldUseDarkColors ? iconLight : iconDark
|
||||||
const newImage = nativeImage.createFromPath(newIconPath)
|
const newImage = nativeImage.createFromPath(newIconPath)
|
||||||
const newResizedImage = newImage.resize({ width: 24, height: 24 })
|
const newResizedImage = newImage.resize({ width: 16, height: 16 })
|
||||||
tray.setImage(newResizedImage)
|
tray.setImage(newResizedImage)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user