added multi os icon specs

This commit is contained in:
Nicolas Constant 2020-10-01 21:58:35 -04:00
parent 0d1a2e59d4
commit 45d735835b
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 31 additions and 17 deletions

View File

@ -7,23 +7,37 @@ let win;
function createWindow() {
// Create the browser window.
win = new BrowserWindow({
width: 377,
height: 800,
title: "Sengi",
//icon: join(__dirname, '/src/assets/icons/icon-512x512.png'),
icon: join(__dirname, '/assets/icons/win/icon.ico'),
backgroundColor: "#131925",
useContentSize: true,
webPreferences: {
spellcheck: false
}
// webPreferences: {
// contextIsolation: true,
// nodeIntegration: false,
// nodeIntegrationInWorker: false
// }
});
if(process.platform === "win32"){
win = new BrowserWindow({
width: 377,
height: 800,
title: "Sengi",
icon: join(__dirname, '/assets/icons/win/icon.ico'),
backgroundColor: "#131925",
useContentSize: true,
webPreferences: {
spellcheck: false
}
// webPreferences: {
// contextIsolation: true,
// nodeIntegration: false,
// nodeIntegrationInWorker: false
// }
});
} else {
win = new BrowserWindow({
width: 377,
height: 800,
title: "Sengi",
//icon: join(__dirname, '/src/assets/icons/icon-512x512.png'),
icon: join(__dirname, '/assets/icons/png/512x512.png'),
backgroundColor: "#131925",
useContentSize: true,
webPreferences: {
spellcheck: false
}
});
}
win.setAutoHideMenuBar(true);
win.setMenuBarVisibility(false);