This commit is contained in:
GHOSCHT 2020-08-01 20:58:36 +02:00
parent f3386302f0
commit 3a794c7b5e

View file

@ -5,9 +5,10 @@ const screenz = require('screenz');
const isDevelopment = process.env.NODE_ENV === 'development'; const isDevelopment = process.env.NODE_ENV === 'development';
let mainWindow = null; let mainWindow = null;
let tray = null;
let forceQuit = false; let forceQuit = false;
const windowSize = { width: 630, height: 350 }; const windowSize = { width: 620, height: 320 };
const taskBarHeight = 40; const taskBarHeight = 40;
const installExtensions = async () => { const installExtensions = async () => {
@ -43,8 +44,10 @@ app.on('ready', async () => {
y: screenz.height - windowSize.height - taskBarHeight, y: screenz.height - windowSize.height - taskBarHeight,
movable: false, movable: false,
resizable: false, resizable: false,
transparent: true,
frame: false, frame: false,
show: false, show: false,
skipTaskbar: true,
alwaysOnTop: true, alwaysOnTop: true,
webPreferences: { webPreferences: {
nodeIntegration: true, nodeIntegration: true,
@ -83,6 +86,7 @@ app.on('ready', async () => {
}); });
} else { } else {
mainWindow.on('closed', () => { mainWindow.on('closed', () => {
tray.destroy();
mainWindow = null; mainWindow = null;
}); });
@ -93,7 +97,7 @@ app.on('ready', async () => {
}); });
} }
let tray = createTray(); tray = createTray();
}); });
function createTray() { function createTray() {