-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #256 from Guovin/dev
Release:v1.3.6
- Loading branch information
Showing
15 changed files
with
232 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
dist | ||
build | ||
build | ||
result_new.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,4 +112,4 @@ Fork 本项目并开启工作流更新 | |
|
||
## 赞赏 | ||
|
||
![image](./docs/images/appreciate.jpg) | ||
![image](./static/images/appreciate.jpg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import tkinter as tk | ||
from PIL import Image, ImageTk | ||
import webbrowser | ||
from utils.config import resource_path | ||
|
||
|
||
class AboutUI: | ||
def init_ui(self, root=None, version=None): | ||
about_window = tk.Toplevel(root) | ||
about_window.title("关于") | ||
about_window_width = 430 | ||
about_window_height = 430 | ||
|
||
version_frame = tk.Frame(about_window) | ||
version_frame.pack(side=tk.TOP, fill=tk.X) | ||
|
||
version_label = tk.Label(version_frame, text=f"版本: {version}") | ||
version_label.pack() | ||
|
||
author_row = tk.Frame(about_window) | ||
author_row.pack() | ||
author_row_column1 = tk.Frame(author_row) | ||
author_row_column1.pack(side=tk.LEFT, fill=tk.Y) | ||
author_row_column2 = tk.Frame(author_row) | ||
author_row_column2.pack(side=tk.RIGHT, fill=tk.Y) | ||
author_label = tk.Label(author_row_column1, text="作者:") | ||
author_label.pack() | ||
author_name = tk.Label( | ||
author_row_column2, text="Govin", fg="blue", cursor="hand2" | ||
) | ||
author_name.pack() | ||
author_name.bind( | ||
"<Button-1>", | ||
lambda e: webbrowser.open_new_tab("https://github.com/Guovin"), | ||
) | ||
|
||
project_row = tk.Frame(about_window) | ||
project_row.pack() | ||
project_row_column1 = tk.Frame(project_row) | ||
project_row_column1.pack(side=tk.LEFT, fill=tk.Y) | ||
project_row_column2 = tk.Frame(project_row) | ||
project_row_column2.pack(side=tk.RIGHT, fill=tk.Y) | ||
project_label = tk.Label(project_row_column1, text="项目地址:") | ||
project_label.pack() | ||
project_link = tk.Label( | ||
project_row_column2, | ||
text="https://github.com/Guovin/TV", | ||
fg="blue", | ||
cursor="hand2", | ||
) | ||
project_link.pack() | ||
project_link.bind( | ||
"<Button-1>", | ||
lambda e: webbrowser.open_new_tab("https://github.com/Guovin/TV"), | ||
) | ||
|
||
disclaimer_label = tk.Label( | ||
version_frame, | ||
text="本软件仅供学习交流用途,数据均来源于互联网,禁止商业行为,一切法律责任与作者无关。", | ||
wraplength=265, | ||
) | ||
disclaimer_label.pack() | ||
|
||
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.pack() | ||
|
||
confirm_button = tk.ttk.Button( | ||
about_window, text="确定", command=about_window.destroy | ||
) | ||
confirm_button.pack(side=tk.RIGHT, padx=5) | ||
|
||
main_width = root.winfo_width() | ||
main_height = root.winfo_height() | ||
main_x = root.winfo_x() | ||
main_y = root.winfo_y() | ||
pos_x = main_x + (main_width // 2) - (about_window_width // 2) | ||
pos_y = main_y + (main_height // 2) - (about_window_height // 2) | ||
about_window.geometry( | ||
f"{about_window_width}x{about_window_height}+{pos_x}+{pos_y}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.