diff --git a/app/electron/main.js b/app/electron/main.js index 73c27a5ea..67845d9ad 100644 --- a/app/electron/main.js +++ b/app/electron/main.js @@ -84,10 +84,8 @@ try { } } catch (e) { console.error(e) - require('electron'). - dialog. - showErrorBox('创建配置目录失败 Failed to create config directory', - '思源需要在用户家目录下创建配置文件夹(~/.config/siyuan),请确保该路径具有写入权限。\n\nSiYuan needs to create a configuration folder (~/.config/siyuan) in the user\'s home directory. Please make sure that the path has write permissions.') + require('electron').dialog.showErrorBox('创建配置目录失败 Failed to create config directory', + '思源需要在用户家目录下创建配置文件夹(~/.config/siyuan),请确保该路径具有写入权限。\n\nSiYuan needs to create a configuration folder (~/.config/siyuan) in the user\'s home directory. Please make sure that the path has write permissions.') app.exit() } @@ -151,12 +149,6 @@ const boot = () => { windowState.width = Math.min(defaultWidth, workArea.width) windowState.height = Math.min(defaultHeight, workArea.height) } - if (windowState.width < 256) { - windowState.width = Math.min(defaultWidth, workArea.width) - } - if (windowState.height < 256) { - windowState.height = Math.min(defaultHeight, workArea.height) - } if (x > workArea.width || x < 0) { x = 0 } @@ -164,6 +156,12 @@ const boot = () => { y = 0 } } + if (windowState.width < 400) { + windowState.width = 400 + } + if (windowState.height < 300) { + windowState.height = 300 + } // 创建主窗体 mainWindow = new BrowserWindow({