Сделал открытие экземпляра приложение на всю ширину и высоту
This commit is contained in:
+5
-2
@@ -8,10 +8,13 @@ if (started) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const createWindow = () => {
|
const createWindow = () => {
|
||||||
|
const { screen } = require('electron');
|
||||||
|
const primaryDisplay = screen.getPrimaryDisplay();
|
||||||
|
const { width, height } = primaryDisplay.workAreaSize;
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
const mainWindow = new BrowserWindow({
|
const mainWindow = new BrowserWindow({
|
||||||
width: 800,
|
width: width,
|
||||||
height: 600,
|
height: height,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: path.join(__dirname, 'preload.js'),
|
preload: path.join(__dirname, 'preload.js'),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user