mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
fix: editor fails to resize after toggling on macos
This commit is contained in:
@@ -216,7 +216,12 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
||||
color="inherit"
|
||||
title={t(isMaximized ? "Minimize" : "Maximize")}
|
||||
onClick={() =>
|
||||
appWindow.toggleMaximize().then(() => editorRef.current?.layout())
|
||||
appWindow.toggleMaximize().then(() => {
|
||||
editorRef.current?.layout();
|
||||
setTimeout(() => {
|
||||
editorRef.current?.layout();
|
||||
}, 500);
|
||||
})
|
||||
}
|
||||
>
|
||||
{isMaximized ? <CloseFullscreenIcon /> : <OpenInFullIcon />}
|
||||
|
||||
Reference in New Issue
Block a user