mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-28 19:26:09 +01:00
🎨 桌面端重启以后保证窗口最小大小 Fix https://github.com/siyuan-note/siyuan/issues/6041
This commit is contained in:
parent
c50679ec9e
commit
72806cfbad
1 changed files with 8 additions and 2 deletions
|
|
@ -149,10 +149,10 @@ const boot = () => {
|
|||
windowState.width = Math.min(defaultWidth, workArea.width)
|
||||
windowState.height = Math.min(defaultHeight, workArea.height)
|
||||
}
|
||||
if (x > workArea.width || x < 0) {
|
||||
if (x > workArea.width) {
|
||||
x = 0
|
||||
}
|
||||
if (y > workArea.height || y < 0) {
|
||||
if (y > workArea.height) {
|
||||
y = 0
|
||||
}
|
||||
}
|
||||
|
|
@ -162,6 +162,12 @@ const boot = () => {
|
|||
if (windowState.height < 300) {
|
||||
windowState.height = 300
|
||||
}
|
||||
if (x < 0) {
|
||||
x = 0
|
||||
}
|
||||
if (y < 0) {
|
||||
y = 0
|
||||
}
|
||||
|
||||
// 创建主窗体
|
||||
mainWindow = new BrowserWindow({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue