Files
ms365-electron/app/config/dimensions.js
Agampreet Singh dc5b3c86d5 Refactor config and simplify error handling
- Moved several utility and configuration files (rpc.js, store.js, dimensions.js, and menu.js) to a new `config` directory to improve project organization.

- This refactor does not affect the functionality of the app.
2024-07-22 13:21:44 +05:30

15 lines
314 B
JavaScript

import { app, screen } from "electron";
let screenWidth, screenHeight;
app.on("ready", () => {
({ width: screenWidth, height: screenHeight } = screen.getPrimaryDisplay().workAreaSize);
});
export function getScreenWidth() {
return screenWidth;
}
export function getScreenHeight() {
return screenHeight;
}