mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🐛 重启后窗口大小恢复默认问题 Fix https://github.com/siyuan-note/siyuan/issues/7755
This commit is contained in:
parent
7e8c1b39d7
commit
555a9ba2ca
1 changed files with 4 additions and 2 deletions
|
|
@ -206,11 +206,13 @@ const boot = () => {
|
||||||
height: defaultHeight,
|
height: defaultHeight,
|
||||||
}, oldWindowState);
|
}, oldWindowState);
|
||||||
|
|
||||||
|
// writeLog("windowStat [width=" + windowState.width + ", height=" + windowState.height + "], default [width=" + defaultWidth + ", height=" + defaultHeight + "], workArea [width=" + workArea.width + ", height=" + workArea.height + "]");
|
||||||
|
|
||||||
let x = windowState.x;
|
let x = windowState.x;
|
||||||
let y = windowState.y;
|
let y = windowState.y;
|
||||||
if (workArea) {
|
if (workArea) {
|
||||||
// 窗口大小等同于或大于 workArea 时,缩小会隐藏到左下角
|
// 窗口大于 workArea 时缩小会隐藏到左下角,这里使用最小值重置
|
||||||
if (windowState.width >= workArea.width || windowState.height >= workArea.height) {
|
if (windowState.width > workArea.width || windowState.height > workArea.height) { // 重启后窗口大小恢复默认问题 https://github.com/siyuan-note/siyuan/issues/7755
|
||||||
windowState.width = Math.min(defaultWidth, workArea.width);
|
windowState.width = Math.min(defaultWidth, workArea.width);
|
||||||
windowState.height = Math.min(defaultHeight, workArea.height);
|
windowState.height = Math.min(defaultHeight, workArea.height);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue