From 7c25ad4c9d52defc80e8692cff9042915506410f 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: Thu, 8 Aug 2024 22:53:54 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/LunaTranslator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/LunaTranslator/LunaTranslator/LunaTranslator.py b/LunaTranslator/LunaTranslator/LunaTranslator.py index 4dbcfe06..ce913ae8 100644 --- a/LunaTranslator/LunaTranslator/LunaTranslator.py +++ b/LunaTranslator/LunaTranslator/LunaTranslator.py @@ -1232,6 +1232,7 @@ class MAINUI: winsharedutils.globalmessagelistener(self.messagecallback__) self.inittray() self.createsavegamedb() + self.__count = 0 def openlink(self, file): if file.startswith("http") and checkisusingwine(): @@ -1242,7 +1243,9 @@ class MAINUI: def messagecallback(self, msg, param): if msg == 0: if globalconfig["darklight2"] == 0: - self.commonstylebase.setstylesheetsignal.emit() + self.__count += 1 + if self.__count % 2: + self.commonstylebase.setstylesheetsignal.emit() elif msg == 1: if bool(param): windows.BringWindowToTop(int(self.translation_ui.winid))