feat: 工具栏动态宽度 - 根据内容自动调整窗口宽度
This commit is contained in:
@@ -81,6 +81,11 @@ export function setupIpc(win: BrowserWindow): void {
|
||||
win.setPosition(x, y)
|
||||
})
|
||||
|
||||
ipcMain.handle('window:resizeMain', (_event, width: number) => {
|
||||
const [wx, wy] = win.getPosition()
|
||||
win.setBounds({ x: wx, y: wy, width: Math.max(200, Math.min(width, 1200)), height: 64 })
|
||||
})
|
||||
|
||||
ipcMain.handle('screenshot:start', () => {
|
||||
log.info('IPC: screenshot:start')
|
||||
startScreenshot(win)
|
||||
|
||||
Reference in New Issue
Block a user