Skip to content

Commit

Permalink
chore:image
Browse files Browse the repository at this point in the history
  • Loading branch information
Guovin committed Aug 22, 2024
1 parent 21b5d36 commit c98191f
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ Fork 本项目并开启工作流更新

## 赞赏

![image](./docs/images/appreciate.jpg)
![image](./static/images/appreciate.jpg)
2 changes: 1 addition & 1 deletion README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ If you don't want to bother, and my configuration just meets your needs, you can

## Appreciate

![image](./docs/images/appreciate.jpg)
![image](./static/images/appreciate.jpg)
File renamed without changes
Binary file modified static/images/favicon.ico
Binary file not shown.
Binary file removed static/images/logo.png
Binary file not shown.
5 changes: 3 additions & 2 deletions tkinter_ui/about.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import tkinter as tk
from PIL import Image, ImageTk
import webbrowser
from utils.config import resource_path


class AboutUI:
Expand Down Expand Up @@ -60,14 +61,14 @@ def init_ui(self, root=None, version=None):
)
disclaimer_label.pack()

image = Image.open("docs/images/appreciate.jpg")
image = Image.open(resource_path("static/images/appreciate.jpg"))
resized_image = image.resize((250, 250))
photo = ImageTk.PhotoImage(resized_image)
image_label = tk.Label(about_window, image=photo)
image_label.image = photo
image_label.pack()

appreciate_label = tk.Label(about_window, text="欢迎赞助")
appreciate_label = tk.Label(about_window, text="您的赞助是我更新的动力")
appreciate_label.pack()

confirm_button = tk.ttk.Button(
Expand Down
4 changes: 1 addition & 3 deletions tkinter_ui/tkinter_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,5 @@ def get_root_location(root):
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
root.geometry("%dx%d+%d+%d" % get_root_location(root))
icon = tk.PhotoImage(file="static/images/logo.png")
root.iconphoto(True, icon)
root.iconbitmap("static/images/favicon.ico")
root.iconbitmap(resource_path("static/images/favicon.ico"))
root.mainloop()
6 changes: 5 additions & 1 deletion tkinter_ui/tkinter_ui.spec
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# -*- mode: python ; coding: utf-8 -*-

a = Analysis(
['tkinter_ui.py', 'default.py', 'multicast.py', 'hotel.py', 'subscribe.py', 'online_search.py'],
['tkinter_ui.py', 'about.py', 'default.py', 'multicast.py', 'hotel.py', 'subscribe.py', 'online_search.py'],
pathex=[],
binaries=[],
datas=[
('../config/config.ini', 'config'),
('../config/demo.txt', 'config'),
('../updates/multicast/multicast_map.json', 'updates/multicast'),
('../updates/multicast/multicast_region_result.json', 'updates/multicast'),
('../static/images/favicon.ico', 'static/images'),
('../static/images/appreciate.jpg', 'static/images'),
('about.py', '.'),
('default.py', '.'),
('multicast.py', '.'),
('hotel.py', '.'),
Expand Down Expand Up @@ -46,4 +49,5 @@ exe = EXE(
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon='../static/images/favicon.ico'
)

0 comments on commit c98191f

Please sign in to comment.