mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
fix
This commit is contained in:
parent
df3e624f7c
commit
0deec10d67
@ -349,11 +349,7 @@ class Textbrowser:
|
|||||||
maxnewh = 0
|
maxnewh = 0
|
||||||
for i in range(len(subtext)):
|
for i in range(len(subtext)):
|
||||||
maxnewh = max(maxnewh, subpos[i].y())
|
maxnewh = max(maxnewh, subpos[i].y())
|
||||||
_ = self.guesscreatelabel(
|
_ = self.guesscreatelabel(self.toplabel2, color)
|
||||||
self.toplabel2,
|
|
||||||
color,
|
|
||||||
globalconfig["miaobiancolor"],
|
|
||||||
)
|
|
||||||
_.move(subpos[i])
|
_.move(subpos[i])
|
||||||
_.setText(subtext[i])
|
_.setText(subtext[i])
|
||||||
_.setFont(self.font)
|
_.setFont(self.font)
|
||||||
@ -398,11 +394,7 @@ class Textbrowser:
|
|||||||
self.textbrowser.setTextCursor(self.textcursor)
|
self.textbrowser.setTextCursor(self.textcursor)
|
||||||
tl1 = self.textbrowser.cursorRect(self.textcursor).topLeft()
|
tl1 = self.textbrowser.cursorRect(self.textcursor).topLeft()
|
||||||
|
|
||||||
_ = self.guesscreatelabel(
|
_ = self.guesscreatelabel(self.toplabel2, color)
|
||||||
self.toplabel2,
|
|
||||||
color,
|
|
||||||
globalconfig["miaobiancolor"],
|
|
||||||
)
|
|
||||||
|
|
||||||
_.move(tl1)
|
_.move(tl1)
|
||||||
_.setText(block.text()[s : s + l])
|
_.setText(block.text()[s : s + l])
|
||||||
@ -695,7 +687,9 @@ class Textbrowser:
|
|||||||
self.settextposcursor(startpos)
|
self.settextposcursor(startpos)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def guesscreatelabel(self, p, c1, c2):
|
def guesscreatelabel(self, p, color):
|
||||||
|
c1 = color
|
||||||
|
c2 = globalconfig["miaobiancolor"]
|
||||||
if globalconfig["zitiyangshi2"] == 2:
|
if globalconfig["zitiyangshi2"] == 2:
|
||||||
label = BorderedLabel(p)
|
label = BorderedLabel(p)
|
||||||
label.setColorWidth(c1, c2, globalconfig["miaobianwidth2"])
|
label.setColorWidth(c1, c2, globalconfig["miaobianwidth2"])
|
||||||
@ -722,11 +716,7 @@ class Textbrowser:
|
|||||||
return label
|
return label
|
||||||
|
|
||||||
def solvejiaminglabel(self, word, font, tl1, tl2, fh):
|
def solvejiaminglabel(self, word, font, tl1, tl2, fh):
|
||||||
_ = self.guesscreatelabel(
|
_ = self.guesscreatelabel(self.parent, globalconfig["jiamingcolor"])
|
||||||
self.parent,
|
|
||||||
globalconfig["jiamingcolor"],
|
|
||||||
globalconfig["miaobiancolor"],
|
|
||||||
)
|
|
||||||
|
|
||||||
_.setText(word["hira"])
|
_.setText(word["hira"])
|
||||||
_.setFont(font)
|
_.setFont(font)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user