Skip to content

Commit 9ff6490

Browse files
committed
Icon attempt
1 parent ab13f31 commit 9ff6490

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

electron/src/constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ export const BACKGROUND_COLOR = '#fbf9f7'
2626
//export const CURRENT_DIR = path.join(__dirname, '..');
2727
export const MAIN_FILE = path.join(__dirname, '../web/index.html')
2828
export const SPLASH_FILE = path.join(__dirname, '../web/splashscreen.html')
29-
export const LINUX_ICON_FILE = path.join(__dirname, '../web/logo/logo256.png')
29+
export const LINUX_ICON_FILE = path.join(__dirname, '../web/logo/icon512.png')
30+
export const ICON_FILEPATH = path.join(__dirname, "/logo/logo256.png")

electron/src/index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import {
3737
LINUX_ICON_FILE,
3838
SPLASH_FILE,
3939
MAIN_FILE,
40-
IS_DEBUG, APP_DATA_PATH
40+
IS_DEBUG, APP_DATA_PATH, ICON_FILEPATH
4141
} from './constants'
4242

4343
import {initApp, addUidToDisk} from "./init";
@@ -97,10 +97,7 @@ const createMainWindow = async (appPort: string): Promise<BrowserWindow> => {
9797
webgl: false,
9898
enableWebSQL: false,
9999
},
100-
icon: __dirname + `/logo/logo256.png`,
101-
}
102-
if (process.platform === 'linux') {
103-
options.icon = LINUX_ICON_FILE
100+
icon: process.platform === 'linux'? LINUX_ICON_FILE : ICON_FILEPATH,
104101
}
105102
let mainWindow = new BrowserWindow(options)
106103

@@ -221,7 +218,7 @@ const createSplashWindow = (): BrowserWindow => {
221218
webgl: false,
222219
enableWebSQL: false,
223220
},
224-
icon: path.join(__dirname, "/logo/logo256.png"),
221+
icon: process.platform === 'linux'? LINUX_ICON_FILE : ICON_FILEPATH,
225222
})
226223
/** and load it */
227224
if (app.isPackaged) {

electron/web/logo/icon.icns

-63.7 KB
Binary file not shown.

electron/web/logo/icon.ico

-26.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)