From ce45fdcabb03a924d601ad0932e76a6790720f11 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: Sat, 4 May 2024 21:54:42 +0800 Subject: [PATCH] ... --- LunaTranslator/LunaTranslator/gui/textbrowser.py | 7 +++++++ LunaTranslator/LunaTranslator/gui/translatorUI.py | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/LunaTranslator/LunaTranslator/gui/textbrowser.py b/LunaTranslator/LunaTranslator/gui/textbrowser.py index 2e07e4eb..9673d503 100644 --- a/LunaTranslator/LunaTranslator/gui/textbrowser.py +++ b/LunaTranslator/LunaTranslator/gui/textbrowser.py @@ -266,7 +266,14 @@ class Textbrowser: self.movep(0, self.savey) if globalconfig["zitiyangshi"] == 3: + self.textbrowser.show() + self.textbrowserback.show() self.showyinyingtext(color, b1, b2) + self.textbrowser.hide() + self.textbrowserback.hide() + else: + self.textbrowser.show() + self.textbrowserback.show() def getcurrpointer(self): return self.textcursor.position() diff --git a/LunaTranslator/LunaTranslator/gui/translatorUI.py b/LunaTranslator/LunaTranslator/gui/translatorUI.py index 92f8dfc2..50770a50 100644 --- a/LunaTranslator/LunaTranslator/gui/translatorUI.py +++ b/LunaTranslator/LunaTranslator/gui/translatorUI.py @@ -872,7 +872,14 @@ class QUnFrameWindow(resizableframeless): return newHeight = self.document.size().height() width = self.width() - self.resize(width, int(5 + newHeight + globalconfig["buttonsize"] * 1.5)) + self.resize( + width, + int( + max(0, -globalconfig["extra_space"]) + + newHeight + + globalconfig["buttonsize"] * 1.5 + ), + ) def clickRange(self, auto): if globalconfig["sourcestatus2"]["ocr"]["use"] == False: