mirror of
https://github.com/zhang-pu/traymon.git
synced 2026-12-01 09:28:26 +08:00
fix: pystray setup callback signature (pystray passes icon as arg)
This commit is contained in:
parent
f479f4edf2
commit
2033a7cc1e
1 changed files with 4 additions and 1 deletions
|
|
@ -280,7 +280,10 @@ def main():
|
|||
)
|
||||
app.icon = icon
|
||||
|
||||
def _tick():
|
||||
def _tick(icon_arg=None):
|
||||
# pystray 会把 icon 作为参数传给 setup 回调
|
||||
if icon_arg is not None:
|
||||
icon_arg.visible = True
|
||||
app.refresh()
|
||||
return True
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue