1
0
mirror of https://github.com/NicolasConstant/sengi synced 2025-01-03 12:09:18 +01:00

refactoring

This commit is contained in:
Nicolas Constant 2020-10-01 22:01:09 -04:00
parent 45d735835b
commit c2f9c17189
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688

View File

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