From d07893a794cecacb551a2a0737ef5f2929f7d7d7 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: Mon, 15 Jul 2024 02:08:19 +0800 Subject: [PATCH] fix --- .../LunaTranslator/rendertext/textbrowser_imp/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LunaTranslator/LunaTranslator/rendertext/textbrowser_imp/base.py b/LunaTranslator/LunaTranslator/rendertext/textbrowser_imp/base.py index 64cc47ca..d62b601c 100644 --- a/LunaTranslator/LunaTranslator/rendertext/textbrowser_imp/base.py +++ b/LunaTranslator/LunaTranslator/rendertext/textbrowser_imp/base.py @@ -62,9 +62,8 @@ class base(QLabel): text = self.text() isarabic = lambda char: (ord(char) >= 0x0600 and ord(char) <= 0x06E0) isfirstara = lambda text: len(text) and isarabic(text[0]) - isarabicx = any(isarabic(char) for char in text) and isfirstara(text) - if isarabicx: + if isfirstara(text): self.movedx -= self.width() self.movedx += dx else: