mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
.
This commit is contained in:
parent
5db4b4185d
commit
a14ca9ca30
@ -48,7 +48,7 @@ class dialog_selecticon(QDialog):
|
||||
self.close()
|
||||
|
||||
|
||||
def doadjust():
|
||||
def doadjust(_):
|
||||
gobject.baseobject.translation_ui.enterfunction(delay=3)
|
||||
gobject.baseobject.translation_ui.adjustbuttons()
|
||||
|
||||
@ -77,7 +77,7 @@ def changerank(item, up, sortlist, savelist, savelay):
|
||||
savelist[idx2 + headoffset],
|
||||
savelist[idx + headoffset],
|
||||
)
|
||||
doadjust()
|
||||
doadjust(None)
|
||||
|
||||
|
||||
def createbuttonwidget(self, lay):
|
||||
@ -112,7 +112,7 @@ def createbuttonwidget(self, lay):
|
||||
D_getsimpleswitch(
|
||||
globalconfig["toolbutton"]["buttons"][k],
|
||||
"use",
|
||||
callback=lambda _: doadjust(),
|
||||
callback=doadjust,
|
||||
),
|
||||
button_up,
|
||||
button_down,
|
||||
@ -120,7 +120,7 @@ def createbuttonwidget(self, lay):
|
||||
_TRL(["居左", "居右", "居中"]),
|
||||
globalconfig["toolbutton"]["buttons"][k],
|
||||
"align",
|
||||
callback=lambda _: doadjust(),
|
||||
callback=doadjust,
|
||||
fixedsize=True,
|
||||
),
|
||||
D_getcolorbutton(
|
||||
|
@ -202,7 +202,7 @@ def createbtnthemedark(self):
|
||||
return self.btnthemedark
|
||||
|
||||
|
||||
def checkthemesettingvisandapply(self, _dark):
|
||||
def checkthemesettingvisandapply(self, _dark, _):
|
||||
checkthemesettingvisandapply_1(self, _dark)
|
||||
maybesetstyle(_dark)
|
||||
|
||||
@ -319,7 +319,7 @@ def uisetting(self):
|
||||
_TRL(["明亮", "黑暗", "跟随系统"]),
|
||||
globalconfig,
|
||||
"darklight",
|
||||
gobject.baseobject.setcommonstylesheet,
|
||||
lambda _: gobject.baseobject.setcommonstylesheet(),
|
||||
),
|
||||
5,
|
||||
),
|
||||
|
@ -369,12 +369,7 @@ def callbackwrap(d, k, call, _):
|
||||
d[k] = _
|
||||
if call:
|
||||
try:
|
||||
sig = inspect.signature(call)
|
||||
np = len(sig.parameters)
|
||||
if np >= 1:
|
||||
call(_)
|
||||
elif np == 0:
|
||||
call()
|
||||
call(_)
|
||||
except:
|
||||
print_exc()
|
||||
|
||||
@ -383,12 +378,7 @@ def comboboxcallbackwrap(internallist, d, k, call, _):
|
||||
d[k] = internallist[_]
|
||||
if call:
|
||||
try:
|
||||
sig = inspect.signature(call)
|
||||
np = len(sig.parameters)
|
||||
if np >= 1:
|
||||
call(_)
|
||||
elif np == 0:
|
||||
call()
|
||||
call(_)
|
||||
except:
|
||||
print_exc()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user