fix(desktop): show tray icon in packaged builds
The tray icon was loaded from desktop/build/icon.png, but build/ is electron-builder's default buildResources directory, whose contents are not packaged into the app. The icon therefore existed when running from source but was missing in every released build, leaving an empty tray icon. Load the icon from the packaged app root instead and add icon.png there, rendered from the circular logo.svg so it has transparent corners rather than the square full-bleed source artwork. Fixes #2668
This commit is contained in:
parent
e0fa2bbed4
commit
1af6d7763b
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
|
|
@ -397,7 +397,11 @@ function toggleQuickEntry() {
|
|||
// ─── System tray ─────────────────────────────────────────────────────
|
||||
function setupTray() {
|
||||
if (!tray) {
|
||||
const iconPath = path.join(__dirname, 'build', 'icon.png')
|
||||
// NOTE: load the icon from the app root, not build/. The build/ directory is
|
||||
// electron-builder's buildResources dir and is NOT packaged into the app, so
|
||||
// referencing build/icon.png here works in dev but yields an empty tray icon
|
||||
// in packaged releases (see issue #2668).
|
||||
const iconPath = path.join(__dirname, 'icon.png')
|
||||
const icon = nativeImage.createFromPath(iconPath).resize({width: 16, height: 16})
|
||||
tray = new Tray(icon)
|
||||
tray.setToolTip('Vikunja')
|
||||
|
|
|
|||
Loading…
Reference in New Issue