Skip to content

Commit

Permalink
feat: fix window icon for linux
Browse files Browse the repository at this point in the history
fixes #1978
  • Loading branch information
laur89 committed Nov 29, 2024
1 parent c574aa2 commit 01a9344
Show file tree
Hide file tree
Showing 3 changed files with 10 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 @@ -60,6 +60,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.
9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,14 @@ const createWindow = () => {
DEFAULT_APP_SETTINGS.accentColor,
) as string);

const linuxMainWindowConf = {
icon: asarPath(join(

Check failure on line 218 in src/index.ts

View workflow job for this annotation

GitHub Actions / windows

Replace `··icon:·asarPath(` with `icon:·asarPath(⏎······`

Check failure on line 218 in src/index.ts

View workflow job for this annotation

GitHub Actions / macos

Replace `··icon:·asarPath(` with `icon:·asarPath(⏎······`

Check failure on line 218 in src/index.ts

View workflow job for this annotation

GitHub Actions / ubuntu

Replace `··icon:·asarPath(` with `icon:·asarPath(⏎······`
isDevMode ? `${__dirname}../src/` : __dirname,
'assets/images/icons/256x256.png',
),
),
};

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

enableWebContents(mainWindow.webContents);
Expand Down

0 comments on commit 01a9344

Please sign in to comment.