mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24: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():
|
for widget in QApplication.topLevelWidgets():
|
||||||
if widget.testAttribute(Qt.WA_TranslucentBackground):
|
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
|
continue
|
||||||
winsharedutils.SetTheme(
|
winsharedutils.SetTheme(
|
||||||
int(widget.winId()), dark, globalconfig["WindowBackdrop"]
|
int(widget.winId()), dark, globalconfig["WindowBackdrop"]
|
||||||
|
@ -654,8 +654,8 @@ def setTabThree_lazy(self):
|
|||||||
globalconfig,
|
globalconfig,
|
||||||
"WindowEffect",
|
"WindowEffect",
|
||||||
callback=lambda _: [
|
callback=lambda _: [
|
||||||
self.setstylesheet(),
|
|
||||||
gobject.baseobject.translation_ui.set_color_transparency(),
|
gobject.baseobject.translation_ui.set_color_transparency(),
|
||||||
|
gobject.baseobject.translation_ui.seteffect(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
5,
|
5,
|
||||||
|
@ -346,6 +346,7 @@ class QUnFrameWindow(resizableframeless):
|
|||||||
self.setMinimumHeight(int(globalconfig["buttonsize"] * 1.5 + 10))
|
self.setMinimumHeight(int(globalconfig["buttonsize"] * 1.5 + 10))
|
||||||
self.setMinimumWidth(globalconfig["buttonsize"] * 2)
|
self.setMinimumWidth(globalconfig["buttonsize"] * 2)
|
||||||
self.set_color_transparency()
|
self.set_color_transparency()
|
||||||
|
self.seteffect()
|
||||||
self.adjustbuttons()
|
self.adjustbuttons()
|
||||||
|
|
||||||
def ocr_once_function(self):
|
def ocr_once_function(self):
|
||||||
@ -575,6 +576,14 @@ class QUnFrameWindow(resizableframeless):
|
|||||||
|
|
||||||
threading.Thread(target=_).start()
|
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):
|
def __init__(self):
|
||||||
|
|
||||||
super(QUnFrameWindow, self).__init__(
|
super(QUnFrameWindow, self).__init__(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user