[MM-58001] Fix an issue where the window position has a decimal number (#3017)

* [MM-58001] Fix an issue where the window position has a decimal number

* I accidentally a log
This commit is contained in:
Devin Binnie
2024-04-24 13:20:16 -04:00
committed by GitHub
parent 54091f3c7d
commit a6ce24d184
2 changed files with 18 additions and 2 deletions

View File

@@ -155,8 +155,8 @@ function getNewWindowPosition(browserWindow: BrowserWindow) {
const mainWindowPosition = mainWindow.getPosition();
return [
mainWindowPosition[0] + ((mainWindowSize[0] - newWindowSize[0]) / 2),
mainWindowPosition[1] + ((mainWindowSize[1] - newWindowSize[1]) / 2),
Math.floor(mainWindowPosition[0] + ((mainWindowSize[0] - newWindowSize[0]) / 2)),
Math.floor(mainWindowPosition[1] + ((mainWindowSize[1] - newWindowSize[1]) / 2)),
];
}