From 4a09a23a7f1c235e8f62ab78208bf1de0a28ebda 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, 27 Apr 2024 22:53:25 +0800 Subject: [PATCH] issues/694 --- .../LunaTranslator/gui/translatorUI.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/LunaTranslator/LunaTranslator/gui/translatorUI.py b/LunaTranslator/LunaTranslator/gui/translatorUI.py index 2285bb20..6963e38e 100644 --- a/LunaTranslator/LunaTranslator/gui/translatorUI.py +++ b/LunaTranslator/LunaTranslator/gui/translatorUI.py @@ -122,10 +122,14 @@ class QUnFrameWindow(resizableframeless): _res = text[: globalconfig["maxoriginlength"]] + "……" else: _res = text - if globalconfig["isshowhira"] and globalconfig["isshowrawtext"]: - self.showline(clear=clear, text=_res, hira=True, color=color) - elif globalconfig["isshowrawtext"]: - self.showline(clear=clear, text=_res, color=color) + if globalconfig["isshowrawtext"]: + hira = ( + globalconfig["isshowhira"] + or globalconfig["usesearchword"] + or globalconfig["usecopyword"] + or globalconfig["show_fenci"] + ) + self.showline(clear=clear, text=_res, hira=hira, color=color) else: self.showline(clear=clear) @@ -266,11 +270,8 @@ class QUnFrameWindow(resizableframeless): self.translate_text.append(text, hira, origin) if globalconfig["zitiyangshi"] == 3: self.translate_text.showyinyingtext(color) - if ( - globalconfig["usesearchword"] - or globalconfig["usecopyword"] - or globalconfig["show_fenci"] - ) and hira: + + if hira: def callback(word): if globalconfig["usewordorigin"] == False: