This commit is contained in:
恍兮惚兮 2024-07-15 02:08:19 +08:00
parent b2f72930d5
commit d07893a794

View File

@ -62,9 +62,8 @@ class base(QLabel):
text = self.text() text = self.text()
isarabic = lambda char: (ord(char) >= 0x0600 and ord(char) <= 0x06E0) isarabic = lambda char: (ord(char) >= 0x0600 and ord(char) <= 0x06E0)
isfirstara = lambda text: len(text) and isarabic(text[0]) 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 -= self.width()
self.movedx += dx self.movedx += dx
else: else: