mirror of
https://github.com/NicolasConstant/sengi
synced 2025-01-03 12:09:18 +01:00
refactoring
This commit is contained in:
parent
45d735835b
commit
c2f9c17189
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user