mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
issues/723
This commit is contained in:
parent
9b7aa7edb8
commit
aa6b2140de
@ -105,21 +105,15 @@ class Textbrowser:
|
||||
self.toplabel.setMouseTracking(True)
|
||||
self.textbrowser.setStyleSheet(
|
||||
"border-width: 0;\
|
||||
border-style: outset;\
|
||||
border-top: 0px solid #e8f3f9;\
|
||||
color: white;\
|
||||
\
|
||||
background-color: rgba(%s, %s, %s, %s)"
|
||||
% (0, 0, 0, 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;\
|
||||
border-top: 0px solid #e8f3f9;\
|
||||
color: white;\
|
||||
\
|
||||
background-color: rgba(%s, %s, %s, %s)"
|
||||
% (0, 0, 0, 0)
|
||||
border-style: outset;\
|
||||
color: rgba(0, 0, 0, 0);\
|
||||
background-color: rgba(0, 0, 0, 0)"
|
||||
)
|
||||
|
||||
self.textcursor = self.textbrowser.textCursor()
|
||||
@ -266,14 +260,7 @@ 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()
|
||||
|
@ -8,7 +8,7 @@ from traceback import print_exc
|
||||
from PyQt5.QtCore import Qt, pyqtSignal
|
||||
import qtawesome
|
||||
from PyQt5.QtCore import pyqtSignal, Qt, QSize
|
||||
from PyQt5.QtGui import QCursor
|
||||
from PyQt5.QtGui import QCursor, QColor
|
||||
from PyQt5.QtWidgets import QLabel, QPushButton, QSystemTrayIcon
|
||||
import gobject
|
||||
from myutils.wrapper import threader, trypass
|
||||
@ -219,7 +219,10 @@ class QUnFrameWindow(resizableframeless):
|
||||
elif globalconfig["zitiyangshi"] == 0:
|
||||
self.translate_text.simplecharformat(color)
|
||||
elif globalconfig["zitiyangshi"] == 3:
|
||||
self.translate_text.simplecharformat(color)
|
||||
# hide后无法重新计算布局。设置和背景相同的颜色和alpha来模拟hide
|
||||
c = QColor(globalconfig["backcolor"])
|
||||
c.setAlpha(globalconfig["transparent"] * (not self.backtransparent) / 100)
|
||||
self.translate_text.simplecharformat(c)
|
||||
|
||||
if iter_context:
|
||||
iter_res_status, iter_context_class = iter_context
|
||||
|
Loading…
x
Reference in New Issue
Block a user