This commit is contained in:
恍兮惚兮 2024-08-08 23:07:25 +08:00
parent 7c25ad4c9d
commit b8a6531bd3
3 changed files with 1 additions and 12 deletions

View File

@ -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))

View File

@ -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

View File

@ -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()