From 2fef1511daa7c5a7e95dcbc3307b3e42f5d7a113 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: Fri, 8 Mar 2024 14:09:30 +0800 Subject: [PATCH] Update textbrowser.py --- LunaTranslator/LunaTranslator/gui/textbrowser.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/LunaTranslator/LunaTranslator/gui/textbrowser.py b/LunaTranslator/LunaTranslator/gui/textbrowser.py index 5f2703ec..e66d3f82 100644 --- a/LunaTranslator/LunaTranslator/gui/textbrowser.py +++ b/LunaTranslator/LunaTranslator/gui/textbrowser.py @@ -286,12 +286,18 @@ class Textbrowser( ): _.setGraphicsEffect(self.geteffect(globalconfig['fontsize'],color,globalconfig['shadowforce'])) _.show() if maxh: + if maxnewh==0: + maxnewh=maxh2 for label in self.yinyinglabels: if label.isVisible()==False:continue if label.pos().y()>maxh: - if maxnewh==0: - maxnewh=maxh2 label.move(label.pos().x(),label.pos().y()+maxnewh-maxh) + for klass in self.iteryinyinglabelsave: + if klass==iter_context_class:continue + for label in self.iteryinyinglabelsave[klass]: + if label.isVisible()==False:continue + if label.pos().y()>maxh: + label.move(label.pos().x(),label.pos().y()+maxnewh-maxh) def showyinyingtext(self,color ): linei=self.yinyingposline