FIX: fixed trayicon on linux not appearing (#136)

* Fix trayicon on linux not appearing

---------

Co-authored-by: Fernando Pinedo <fernando.pinedo@luizalabs.com>
Co-authored-by: Jonatan Heyman <jonatan@heyman.info>
This commit is contained in:
Fernando Pinedo 2024-01-05 22:04:50 -03:00 committed by GitHub
parent 554e04ea67
commit d055db1831
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@ import fs from "fs"
import { menu, getTrayMenu } from './menu' import { menu, getTrayMenu } from './menu'
import { WINDOW_CLOSE_EVENT, SETTINGS_CHANGE_EVENT } from '../constants'; import { WINDOW_CLOSE_EVENT, SETTINGS_CHANGE_EVENT } from '../constants';
import CONFIG from "../config" import CONFIG from "../config"
import { isDev, isMac, isWindows } from '../detect-platform'; import { isDev, isLinux, isMac, isWindows } from '../detect-platform';
import { initializeAutoUpdate, checkForUpdates } from './auto-update'; import { initializeAutoUpdate, checkForUpdates } from './auto-update';
import { fixElectronCors } from './cors'; import { fixElectronCors } from './cors';
import { loadBuffer, contentSaved } from './buffer'; import { loadBuffer, contentSaved } from './buffer';
@ -145,7 +145,9 @@ function createTray() {
let img let img
if (isMac) { if (isMac) {
img = nativeImage.createFromPath(join(process.env.PUBLIC, "iconTemplate.png")) img = nativeImage.createFromPath(join(process.env.PUBLIC, "iconTemplate.png"))
} else { } else if (isLinux) {
img = nativeImage.createFromPath(join(process.env.PUBLIC, 'favicon-linux.png'));
} else{
img = nativeImage.createFromPath(join(process.env.PUBLIC, 'favicon.ico')); img = nativeImage.createFromPath(join(process.env.PUBLIC, 'favicon.ico'));
} }
tray = new Tray(img); tray = new Tray(img);

BIN
public/favicon-linux.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB