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: