This commit is contained in:
恍兮惚兮 2024-05-27 16:39:16 +08:00
parent e523a195b6
commit 2623b88082
3 changed files with 10 additions and 7 deletions

View File

@ -259,12 +259,6 @@ class Settin(closeashidewindow):
for widget in QApplication.topLevelWidgets():
if widget.testAttribute(Qt.WA_TranslucentBackground):
if globalconfig["WindowEffect"] == 0:
winsharedutils.clearEffect(int(widget.winId()))
elif globalconfig["WindowEffect"] == 1:
winsharedutils.setAcrylicEffect(int(widget.winId()))
elif globalconfig["WindowEffect"] == 2:
winsharedutils.setAeroEffect(int(widget.winId()))
continue
winsharedutils.SetTheme(
int(widget.winId()), dark, globalconfig["WindowBackdrop"]

View File

@ -654,8 +654,8 @@ def setTabThree_lazy(self):
globalconfig,
"WindowEffect",
callback=lambda _: [
self.setstylesheet(),
gobject.baseobject.translation_ui.set_color_transparency(),
gobject.baseobject.translation_ui.seteffect(),
],
),
5,

View File

@ -346,6 +346,7 @@ class QUnFrameWindow(resizableframeless):
self.setMinimumHeight(int(globalconfig["buttonsize"] * 1.5 + 10))
self.setMinimumWidth(globalconfig["buttonsize"] * 2)
self.set_color_transparency()
self.seteffect()
self.adjustbuttons()
def ocr_once_function(self):
@ -575,6 +576,14 @@ class QUnFrameWindow(resizableframeless):
threading.Thread(target=_).start()
def seteffect(self):
if globalconfig["WindowEffect"] == 0:
winsharedutils.clearEffect(int(self.winId()))
elif globalconfig["WindowEffect"] == 1:
winsharedutils.setAcrylicEffect(int(self.winId()))
elif globalconfig["WindowEffect"] == 2:
winsharedutils.setAeroEffect(int(self.winId()))
def __init__(self):
super(QUnFrameWindow, self).__init__(