删除关于图标的代码,无用
This commit is contained in:
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
Binary file not shown.
@@ -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.
BIN
RollCall_App/dist/课堂随机点名_v2.7.exe
vendored
BIN
RollCall_App/dist/课堂随机点名_v2.7.exe
vendored
Binary file not shown.
BIN
RollCall_App/rollcall_icon.ico
Normal file
BIN
RollCall_App/rollcall_icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 200 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 MiB |
@@ -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 = "微软雅黑"
|
||||
|
||||
@@ -35,4 +35,5 @@ exe = EXE(
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
icon=['rollcall_icon.ico'],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user