删除关于图标的代码,无用

This commit is contained in:
2025-05-18 10:19:24 +08:00
parent 1e88fb9157
commit 21d35c2d76
11 changed files with 8469 additions and 8468 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -19,7 +19,7 @@ missing module named pwd - imported by posixpath (delayed, conditional, optional
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional)
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional)
missing module named 'collections.abc' - imported by traceback (top-level), typing (top-level), inspect (top-level), logging (top-level), importlib.resources.readers (top-level), selectors (top-level), tracemalloc (top-level)
missing module named posix - imported by os (conditional, optional), posixpath (optional), shutil (conditional), importlib._bootstrap_external (conditional)
missing module named posix - imported by posixpath (optional), shutil (conditional), importlib._bootstrap_external (conditional), os (conditional, optional)
missing module named resource - imported by posix (top-level)
missing module named _posixsubprocess - imported by subprocess (conditional)
missing module named fcntl - imported by subprocess (optional)

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

View File

@@ -1,5 +1,5 @@
import tkinter as tk
from tkinter import ttk, filedialog, messagebox, PhotoImage
from tkinter import ttk, filedialog, messagebox
import tkinter.font # Added for tk.font.Font metrics
import random
# import time
@@ -21,21 +21,21 @@ class RollCallApp:
master.geometry(f"{self._default_width}x{self._default_height}")
# --- Set Window Icon ---
try:
if getattr(sys, 'frozen', False):
base_path = sys._MEIPASS
else:
base_path = os.path.dirname(os.path.abspath(__file__))
icon_path = os.path.join(base_path, 'rollcall_icon.png')
if os.path.exists(icon_path):
app_icon = PhotoImage(file=icon_path)
master.iconphoto(True, app_icon)
else:
print(f"Warning: Icon file not found at {icon_path}. Using default icon.")
except tk.TclError as e:
print(f"Warning: Could not load icon '{icon_path}': {e}. Using default icon.")
except Exception as e:
print(f"Warning: An unexpected error occurred while loading the icon: {e}. Using default icon.")
# try:
# if getattr(sys, 'frozen', False):
# base_path = sys._MEIPASS
# else:
# base_path = os.path.dirname(os.path.abspath(__file__))
# icon_path = os.path.join(base_path, 'rollcall_icon.ico')
# if os.path.exists(icon_path):
# app_icon = PhotoImage(file=icon_path)
# master.iconphoto(True, app_icon)
# else:
# print(f"Warning: Icon file not found at {icon_path}. Using default icon.")
# except tk.TclError as e:
# print(f"Warning: Could not load icon '{icon_path}': {e}. Using default icon.")
# except Exception as e:
# print(f"Warning: An unexpected error occurred while loading the icon: {e}. Using default icon.")
# --- Define Font Families ---
self.font_family_ui = "微软雅黑"

View File

@@ -35,4 +35,5 @@ exe = EXE(
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=['rollcall_icon.ico'],
)