mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Improve the window size settings after application restarts https://github.com/siyuan-note/siyuan/issues/13732
This commit is contained in:
parent
5822519f06
commit
7ce19306ac
1 changed files with 3 additions and 1 deletions
|
|
@ -277,7 +277,9 @@ const initMainWindow = () => {
|
|||
let y = windowState.y;
|
||||
if (workArea) {
|
||||
// 窗口大于 workArea 时缩小会隐藏到左下角,这里使用最小值重置
|
||||
if (windowState.width > workArea.width || windowState.height > workArea.height) { // 重启后窗口大小恢复默认问题 https://github.com/siyuan-note/siyuan/issues/7755
|
||||
if (windowState.width > workArea.width + 32 || windowState.height > workArea.height + 32) {
|
||||
// 重启后窗口大小恢复默认问题 https://github.com/siyuan-note/siyuan/issues/7755 https://github.com/siyuan-note/siyuan/issues/13732
|
||||
// 这里 +32 是因为在某种情况下窗口大小会比 workArea 大几个像素导致恢复默认,+32 可以避免这种特殊情况
|
||||
windowState.width = Math.min(defaultWidth, workArea.width);
|
||||
windowState.height = Math.min(defaultHeight, workArea.height);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue