From b79f87ceb5be31c5b6be15c72d9ddd5648544380 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: Tue, 7 May 2024 16:58:23 +0800 Subject: [PATCH] ... --- LunaTranslator/LunaTranslator/gui/textbrowser.py | 2 -- LunaTranslator/LunaTranslator/gui/translatorUI.py | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/LunaTranslator/LunaTranslator/gui/textbrowser.py b/LunaTranslator/LunaTranslator/gui/textbrowser.py index 15bc16c9..54f51ad8 100644 --- a/LunaTranslator/LunaTranslator/gui/textbrowser.py +++ b/LunaTranslator/LunaTranslator/gui/textbrowser.py @@ -106,13 +106,11 @@ class Textbrowser: self.textbrowser.setStyleSheet( "border-width: 0;\ border-style: outset;\ - color: rgba(0, 0, 0, 0);\ background-color: rgba(0, 0, 0, 0)" ) self.textbrowserback.setStyleSheet( "border-width: 0;\ border-style: outset;\ - color: rgba(0, 0, 0, 0);\ background-color: rgba(0, 0, 0, 0)" ) diff --git a/LunaTranslator/LunaTranslator/gui/translatorUI.py b/LunaTranslator/LunaTranslator/gui/translatorUI.py index c0b29cca..755bdc32 100644 --- a/LunaTranslator/LunaTranslator/gui/translatorUI.py +++ b/LunaTranslator/LunaTranslator/gui/translatorUI.py @@ -219,9 +219,8 @@ class QUnFrameWindow(resizableframeless): elif globalconfig["zitiyangshi"] == 0: self.translate_text.simplecharformat(color) elif globalconfig["zitiyangshi"] == 3: - # hide后无法重新计算布局。设置和背景相同的颜色和alpha来模拟hide - c = QColor(globalconfig["backcolor"]) - c.setAlpha(globalconfig["transparent"] * (not self.backtransparent) / 100) + c = QColor() + c.setAlpha(0) self.translate_text.simplecharformat(c) if iter_context: