diff --git a/app/main.py b/app/main.py index 15957c2..81cab63 100644 --- a/app/main.py +++ b/app/main.py @@ -13,7 +13,8 @@ from PIL import Image import threading import time - +import requests +from io import BytesIO @@ -54,9 +55,13 @@ def WebViewApp(port,dev=False): webview.start(debug=DEBUG, http_server=True) # 启动窗口 timer = threading.Timer(0.25, detect) # 在回调函数中再次启动定时器 timer.start() # 启动定时器 - image = Image.open("C:/Users/16775/Pictures/head.jpg") + response = requests.get('http://docs.marlene.top/demo/model/logo.png') + response = response.content + BytesIOObj = BytesIO() + BytesIOObj.write(response) + image = Image.open(BytesIOObj) menu = (item('打开主页面', action), item('退出', exitProgram)) - icon = pystray.Icon("name", image, "title", menu) + icon = pystray.Icon("name", image, "EMC", menu) icon.run() diff --git a/public/Snipaste_2022-12-01_22-59-42.png b/public/Snipaste_2022-12-01_22-59-42.png deleted file mode 100644 index 379a6d1..0000000 Binary files a/public/Snipaste_2022-12-01_22-59-42.png and /dev/null differ diff --git a/public/logo.ico b/public/logo.ico index 692aff1..e751b90 100644 Binary files a/public/logo.ico and b/public/logo.ico differ diff --git a/public/logo.png b/public/logo.png new file mode 100644 index 0000000..d8ce382 Binary files /dev/null and b/public/logo.png differ