From b8a6531bd33fa52be56c3b7407a8fca842580907 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 23:07:25 +0800 Subject: [PATCH] rm --- LunaTranslator/LunaTranslator/LunaTranslator.py | 2 +- LunaTranslator/LunaTranslator/myutils/hwnd.py | 9 --------- LunaTranslator/LunaTranslator/myutils/utils.py | 2 -- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/LunaTranslator/LunaTranslator/LunaTranslator.py b/LunaTranslator/LunaTranslator/LunaTranslator.py index ce913ae8..32da25db 100644 --- a/LunaTranslator/LunaTranslator/LunaTranslator.py +++ b/LunaTranslator/LunaTranslator/LunaTranslator.py @@ -1243,9 +1243,9 @@ class MAINUI: def messagecallback(self, msg, param): if msg == 0: if globalconfig["darklight2"] == 0: - self.__count += 1 if self.__count % 2: self.commonstylebase.setstylesheetsignal.emit() + self.__count += 1 elif msg == 1: if bool(param): windows.BringWindowToTop(int(self.translation_ui.winid)) diff --git a/LunaTranslator/LunaTranslator/myutils/hwnd.py b/LunaTranslator/LunaTranslator/myutils/hwnd.py index 0c6ab734..b371b588 100644 --- a/LunaTranslator/LunaTranslator/myutils/hwnd.py +++ b/LunaTranslator/LunaTranslator/myutils/hwnd.py @@ -49,15 +49,6 @@ def grabwindow(app="PNG", callback_origin=None): winrtutils._winrt_capture_window(fname + "_winrt_magpie." + app, hwnd) callback(fname + "_winrt_magpie." + app) - _() - hwnd = windows.FindWindow("LosslessScaling", None) - if hwnd: - - @threader - def _(): - winrtutils._winrt_capture_window(fname + "_winrt_lossless." + app, hwnd) - callback(fname + "_winrt_lossless." + app) - _() try: hwnd = gobject.baseobject.textsource.hwnd diff --git a/LunaTranslator/LunaTranslator/myutils/utils.py b/LunaTranslator/LunaTranslator/myutils/utils.py index 4c27330c..603c60fd 100644 --- a/LunaTranslator/LunaTranslator/myutils/utils.py +++ b/LunaTranslator/LunaTranslator/myutils/utils.py @@ -438,12 +438,10 @@ def minmaxmoveobservefunc(self): hwndmagpie = windows.FindWindow( "Window_Magpie_967EB565-6F73-4E94-AE53-00CC42592A22", None ) - hwndlossless = windows.FindWindow("LosslessScaling", None) if ( len(gobject.baseobject.textsource.pids) == 0 or _focusp in gobject.baseobject.textsource.pids or hwnd == hwndmagpie - or hwnd == hwndlossless ): gobject.baseobject.translation_ui.thistimenotsetop = False gobject.baseobject.translation_ui.settop()