mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
faster
This commit is contained in:
parent
e523a195b6
commit
2623b88082
@ -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"]
|
||||
|
@ -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,
|
||||
|
@ -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__(
|
||||
|
Loading…
x
Reference in New Issue
Block a user