fix: editor fails to resize after toggling on macos

This commit is contained in:
dongchengjie 2024-07-08 21:40:56 +08:00
parent aa9e63b51a
commit 4e4f9af5b7
2 changed files with 7 additions and 2 deletions

View File

@ -216,7 +216,12 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
color="inherit" color="inherit"
title={t(isMaximized ? "Minimize" : "Maximize")} title={t(isMaximized ? "Minimize" : "Maximize")}
onClick={() => onClick={() =>
appWindow.toggleMaximize().then(() => editorRef.current?.layout()) appWindow.toggleMaximize().then(() => {
editorRef.current?.layout();
setTimeout(() => {
editorRef.current?.layout();
}, 500);
})
} }
> >
{isMaximized ? <CloseFullscreenIcon /> : <OpenInFullIcon />} {isMaximized ? <CloseFullscreenIcon /> : <OpenInFullIcon />}

View File

@ -133,9 +133,9 @@
"Exclude Type": "排除节点类型", "Exclude Type": "排除节点类型",
"Disable UDP": "禁用UDP", "Disable UDP": "禁用UDP",
"Hidden": "隐藏代理组", "Hidden": "隐藏代理组",
"Extend Config": "扩展配置",
"Group Name Required": "代理组名称不能为空", "Group Name Required": "代理组名称不能为空",
"Group Name Already Exists": "代理组名称已存在", "Group Name Already Exists": "代理组名称已存在",
"Extend Config": "扩展配置",
"Extend Script": "扩展脚本", "Extend Script": "扩展脚本",
"Global Merge": "全局扩展配置", "Global Merge": "全局扩展配置",
"Global Script": "全局扩展脚本", "Global Script": "全局扩展脚本",