- Default window size has been set as the size as 71% width and 74% height of the screen's resolution, which won't make the window size too small for large monitors. - Additionally, implemented a new menu option allowing users to select or set custom default window sizes. Resolves #246
17 lines
345 B
JavaScript
17 lines
345 B
JavaScript
import { app, screen } from "electron";
|
|
|
|
let screenWidth, screenHeight;
|
|
app.on("ready", () => {
|
|
({ width: screenWidth, height: screenHeight } = screen.getPrimaryDisplay().workAreaSize);
|
|
});
|
|
|
|
function getScreenWidth() {
|
|
return screenWidth;
|
|
}
|
|
|
|
function getScreenHeight() {
|
|
return screenHeight;
|
|
}
|
|
|
|
export { getScreenWidth, getScreenHeight };
|