Skip to content

Commit

Permalink
feat: fix window icon for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
laur89 authored and Alphrag committed Dec 1, 2024
1 parent a21003c commit 7af4cfb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ asarUnpack:
- ./recipes
- ./assets/fonts
- ./assets/images/taskbar
- ./assets/images/icons

mac:
hardenedRuntime: true
Expand Down
Binary file added src/assets/images/icons/256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,15 @@ const createWindow = () => {
DEFAULT_APP_SETTINGS.accentColor,
) as string);

const linuxMainWindowConf = {
icon: asarPath(
join(
isDevMode ? `${__dirname}../src/` : __dirname,
'assets/images/icons/256x256.png',
),
),
};

mainWindow = new BrowserWindow({
x: posX,
y: posY,
Expand All @@ -234,6 +243,7 @@ const createWindow = () => {
contextIsolation: false,
webviewTag: true,
},
...(isLinux ? linuxMainWindowConf : {}),
});

enableWebContents(mainWindow.webContents);
Expand Down

0 comments on commit 7af4cfb

Please sign in to comment.