mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
🎨 The PDF/Word export preview window automatically adjusts according to the size of the main window https://github.com/siyuan-note/siyuan/issues/10554
This commit is contained in:
parent
b9e2b7661e
commit
3ced66f749
1 changed files with 8 additions and 4 deletions
|
|
@ -859,12 +859,16 @@ app.whenReady().then(() => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
ipcMain.on("siyuan-export-newwindow", (event, data) => {
|
ipcMain.on("siyuan-export-newwindow", (event, data) => {
|
||||||
|
const parentWnd = getWindowByContentId(event.sender.id);
|
||||||
|
// 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 width = parentWnd.getBounds().width * 0.8;
|
||||||
|
const height = parentWnd.getBounds().height * 0.8;
|
||||||
const printWin = new BrowserWindow({
|
const printWin = new BrowserWindow({
|
||||||
parent: getWindowByContentId(event.sender.id),
|
parent: parentWnd,
|
||||||
modal: true,
|
modal: false,
|
||||||
show: true,
|
show: true,
|
||||||
width: Math.floor(screen.getPrimaryDisplay().size.width * 0.8),
|
width: width,
|
||||||
height: Math.floor(screen.getPrimaryDisplay().workAreaSize.height * 0.8),
|
height: height,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
frame: "darwin" === process.platform,
|
frame: "darwin" === process.platform,
|
||||||
icon: path.join(appDir, "stage", "icon-large.png"),
|
icon: path.join(appDir, "stage", "icon-large.png"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue