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.
This commit is contained in:
gugutu 2024-02-02 09:12:49 +08:00 committed by GitHub
parent 74d12576cd
commit 8487bb86d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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":