1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-16 02:27:00 +02:00

electron screen size

This commit is contained in:
Kyle Spearrin 2018-01-16 20:52:10 -05:00
parent 45465d6169
commit 6c6cceb3c0

View File

@ -11,21 +11,20 @@ if (serve) {
} }
function createWindow() { function createWindow() {
const electronScreen = screen; const primaryScreenSize = screen.getPrimaryDisplay().workAreaSize;
const size = electronScreen.getPrimaryDisplay().workAreaSize;
// Create the browser window. // Create the browser window.
win = new BrowserWindow({ win = new BrowserWindow({
x: 0, x: 0,
y: 0, y: 0,
width: size.width, width: primaryScreenSize.width,
height: size.height, height: primaryScreenSize.height,
}); });
// and load the index.html of the app. // and load the index.html of the app.
win.loadURL(url.format({ win.loadURL(url.format({
protocol: 'file:', protocol: 'file:',
pathname: path.join(__dirname, '/app/index.html'), pathname: path.join(__dirname, '/index.html'),
slashes: true, slashes: true,
})); }));