From 8487bb86d0944238368a514462877ef75c0c118f Mon Sep 17 00:00:00 2001 From: gugutu <59798823+gugutu@users.noreply.github.com> Date: Fri, 2 Feb 2024 09:12:49 +0800 Subject: [PATCH] Increase the setSizes parameter If the parameter given to setSizes is very small and smaller than QSplitter, the sub windows within QSplitter will be stretched. It is advisable to set a larger parameter for setSizes as much as possible. --- src/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/__init__.py b/src/__init__.py index 0dcc159..7a1136d 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -51,8 +51,7 @@ class EditorPreview(object): self._inject_splitter(ed) def _get_splitter(self, editor): - layout = editor.outerLayout - mainR, editorR = [int(r) for r in config["splitRatio"].split(":")] + mainR, editorR = [int(r) * 10000 for r in config["splitRatio"].split(":")] location = config["location"] split = QSplitter() if location == "above":