From 7f954ecb11160deeb64f6e557b70716b22fc671e Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sat, 14 Jan 2023 16:11:58 +0100 Subject: [PATCH] Hypothetically should put icon in linux app but doesn't --- desktop/src/instance.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/desktop/src/instance.ts b/desktop/src/instance.ts index 3991ff2..f7e2d00 100644 --- a/desktop/src/instance.ts +++ b/desktop/src/instance.ts @@ -1,5 +1,5 @@ import { ChildProcessWithoutNullStreams, spawn } from "node:child_process"; -import { app, BrowserWindow, dialog, Menu, MenuItem, shell } from "electron"; +import { app, BrowserWindow, dialog, Menu, MenuItem, shell, nativeImage } from "electron"; import portfinder from "portfinder"; import fetch from "node-fetch"; import { existsSync } from "node:fs"; @@ -144,14 +144,16 @@ export function findInstanceByUrl(url: URL) { let quitting = false; +const icon = nativeImage.createFromPath(process.resourcesPath + "/logo.png"); export function newWindow(instance: Instance, windowState: WindowState) { // Create the browser window. + console.log("Empty icon?", icon.isEmpty()); const window = new BrowserWindow({ height: windowState.height, width: windowState.width, x: windowState.x, y: windowState.y, - icon: process.resourcesPath + "/logo.png", + icon, webPreferences: { preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY, },