From 79a9f4f3a7af0fd9fa5c95678b98a6fd883bf93d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Wed, 3 Jul 2024 21:03:49 +0800 Subject: [PATCH] limit --- LunaTranslator/LunaTranslator/gui/translatorUI.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/LunaTranslator/LunaTranslator/gui/translatorUI.py b/LunaTranslator/LunaTranslator/gui/translatorUI.py index 95b73fa6..8a7517a7 100644 --- a/LunaTranslator/LunaTranslator/gui/translatorUI.py +++ b/LunaTranslator/LunaTranslator/gui/translatorUI.py @@ -841,10 +841,9 @@ class QUnFrameWindow(resizableframeless): return if not globalconfig["adaptive_height"]: return + limit = min(size.height(), self.screen().geometry().height()) newHeight = ( - size.height() - + self.translate_text._padding - + int(globalconfig["buttonsize"] * 1.5) + limit + self.translate_text._padding + int(globalconfig["buttonsize"] * 1.5) ) self.resize(self.width(), newHeight)