yangjie #22

Merged
yangqiang merged 99 commits from yangjie into master 2024-10-22 16:11:46 +08:00
1 changed files with 0 additions and 5 deletions
Showing only changes of commit 5125b83a93 - Show all commits

View File

@ -348,12 +348,7 @@ app.on('ready', () => {
}); });
// 设置子窗口 // 设置子窗口
ipcMain.handle('setChildWindow', (event, config) => { ipcMain.handle('setChildWindow', (event, config) => {
const child = childWindow[config.key];
const display = screen.getDisplayMatching({ ...child.getBounds() });
const { width, height } = display.size
let x, y;
if (config.key === 'shareScreenWindow') { if (config.key === 'shareScreenWindow') {
x = Math.round((width - config.width) / 2);
childWindow[config.key].setBounds({ width: config.width }) childWindow[config.key].setBounds({ width: config.width })
} }
}); });