From 8dac1d944c1516ed792bebb47779b8da35605994 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 25 Mar 2024 20:21:56 +0800 Subject: [PATCH] :art: pdf --- app/electron/main.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/electron/main.js b/app/electron/main.js index 544b8d918..fa87a2e5f 100644 --- a/app/electron/main.js +++ b/app/electron/main.js @@ -907,13 +907,11 @@ app.whenReady().then(() => { }); }); ipcMain.on("siyuan-export-newwindow", (event, data) => { - const parentWndBounds = getWindowByContentId(event.sender.id).getBounds(); - const parentWndScreen = screen.getDisplayNearestPoint({x: parentWndBounds.x, y: parentWndBounds.y}); // The PDF/Word export preview window automatically adjusts according to the size of the main window https://github.com/siyuan-note/siyuan/issues/10554 const printWin = new BrowserWindow({ show: true, - width: parentWndScreen.size.width * 0.9, - height: parentWndScreen.size.height * 0.9, + width: Math.floor(screen.getPrimaryDisplay().size.width * 0.8), + height: Math.floor(screen.getPrimaryDisplay().workAreaSize.height * 0.8), resizable: true, frame: "darwin" === process.platform, icon: path.join(appDir, "stage", "icon-large.png"),