增加深色浅色模式切换,优化缩放

This commit is contained in:
2025-05-17 15:12:38 +08:00
parent 272652d5d1
commit 1e88fb9157
11 changed files with 8808 additions and 8722 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

@@ -267,103 +267,103 @@
'C:\\Users\\Yuxing\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\py_compile.py',
'PYMODULE'),
('pypinyin',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\__init__.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\__init__.py',
'PYMODULE'),
('pypinyin.compat',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\compat.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\compat.py',
'PYMODULE'),
('pypinyin.constants',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\constants.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\constants.py',
'PYMODULE'),
('pypinyin.contrib',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\contrib\\__init__.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\contrib\\__init__.py',
'PYMODULE'),
('pypinyin.contrib._tone_rule',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\contrib\\_tone_rule.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\contrib\\_tone_rule.py',
'PYMODULE'),
('pypinyin.contrib.neutral_tone',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\contrib\\neutral_tone.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\contrib\\neutral_tone.py',
'PYMODULE'),
('pypinyin.contrib.tone_convert',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\contrib\\tone_convert.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\contrib\\tone_convert.py',
'PYMODULE'),
('pypinyin.contrib.tone_sandhi',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\contrib\\tone_sandhi.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\contrib\\tone_sandhi.py',
'PYMODULE'),
('pypinyin.contrib.uv',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\contrib\\uv.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\contrib\\uv.py',
'PYMODULE'),
('pypinyin.converter',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\converter.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\converter.py',
'PYMODULE'),
('pypinyin.core',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\core.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\core.py',
'PYMODULE'),
('pypinyin.exceptions',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\exceptions.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\exceptions.py',
'PYMODULE'),
('pypinyin.phonetic_symbol',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\phonetic_symbol.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\phonetic_symbol.py',
'PYMODULE'),
('pypinyin.phrases_dict',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\phrases_dict.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\phrases_dict.py',
'PYMODULE'),
('pypinyin.pinyin_dict',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\pinyin_dict.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\pinyin_dict.py',
'PYMODULE'),
('pypinyin.seg',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\seg\\__init__.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\seg\\__init__.py',
'PYMODULE'),
('pypinyin.seg.mmseg',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\seg\\mmseg.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\seg\\mmseg.py',
'PYMODULE'),
('pypinyin.seg.simpleseg',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\seg\\simpleseg.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\seg\\simpleseg.py',
'PYMODULE'),
('pypinyin.standard',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\standard.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\standard.py',
'PYMODULE'),
('pypinyin.style',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\style\\__init__.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\style\\__init__.py',
'PYMODULE'),
('pypinyin.style._constants',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\style\\_constants.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\style\\_constants.py',
'PYMODULE'),
('pypinyin.style._tone_convert',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\style\\_tone_convert.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\style\\_tone_convert.py',
'PYMODULE'),
('pypinyin.style._tone_rule',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\style\\_tone_rule.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\style\\_tone_rule.py',
'PYMODULE'),
('pypinyin.style._utils',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\style\\_utils.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\style\\_utils.py',
'PYMODULE'),
('pypinyin.style.bopomofo',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\style\\bopomofo.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\style\\bopomofo.py',
'PYMODULE'),
('pypinyin.style.cyrillic',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\style\\cyrillic.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\style\\cyrillic.py',
'PYMODULE'),
('pypinyin.style.finals',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\style\\finals.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\style\\finals.py',
'PYMODULE'),
('pypinyin.style.gwoyeu',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\style\\gwoyeu.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\style\\gwoyeu.py',
'PYMODULE'),
('pypinyin.style.initials',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\style\\initials.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\style\\initials.py',
'PYMODULE'),
('pypinyin.style.others',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\style\\others.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\style\\others.py',
'PYMODULE'),
('pypinyin.style.tone',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\style\\tone.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\style\\tone.py',
'PYMODULE'),
('pypinyin.style.wadegiles',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\style\\wadegiles.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\style\\wadegiles.py',
'PYMODULE'),
('pypinyin.utils',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\venv_purposed_apps\\Lib\\site-packages\\pypinyin\\utils.py',
'D:\\NETWORK_SYNC\\0_DAILY\\CodeProjects\\purposed_apps\\RollCall_App\\rollcall\\Lib\\site-packages\\pypinyin\\utils.py',
'PYMODULE'),
('quopri',
'C:\\Users\\Yuxing\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\quopri.py',
@@ -422,6 +422,9 @@
('tkinter.filedialog',
'C:\\Users\\Yuxing\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\tkinter\\filedialog.py',
'PYMODULE'),
('tkinter.font',
'C:\\Users\\Yuxing\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\tkinter\\font.py',
'PYMODULE'),
('tkinter.messagebox',
'C:\\Users\\Yuxing\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\tkinter\\messagebox.py',
'PYMODULE'),

View File

@@ -18,8 +18,8 @@ missing module named grp - imported by shutil (delayed, optional), tarfile (opti
missing module named pwd - imported by posixpath (delayed, conditional, optional), shutil (delayed, optional), tarfile (optional), pathlib._local (optional), subprocess (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 tracemalloc (top-level), traceback (top-level), typing (top-level), inspect (top-level), logging (top-level), importlib.resources.readers (top-level), selectors (top-level)
missing module named posix - imported by posixpath (optional), shutil (conditional), importlib._bootstrap_external (conditional), os (conditional, 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 resource - imported by posix (top-level)
missing module named _posixsubprocess - imported by subprocess (conditional)
missing module named fcntl - imported by subprocess (optional)

View File

@@ -15,7 +15,7 @@
<div class="node">
<a name="pyi_rth__tkinter.py"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/PyInstaller/hooks/rthooks/pyi_rth__tkinter.py" type="text/plain"><tt>pyi_rth__tkinter.py</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/PyInstaller/hooks/rthooks/pyi_rth__tkinter.py" type="text/plain"><tt>pyi_rth__tkinter.py</tt></a>
<span class="moduletype">Script</span> <div class="import">
imports:
<a href="#os">os</a>
@@ -32,7 +32,7 @@ imported by:
<div class="node">
<a name="pyi_rth_inspect.py"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/PyInstaller/hooks/rthooks/pyi_rth_inspect.py" type="text/plain"><tt>pyi_rth_inspect.py</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/PyInstaller/hooks/rthooks/pyi_rth_inspect.py" type="text/plain"><tt>pyi_rth_inspect.py</tt></a>
<span class="moduletype">Script</span> <div class="import">
imports:
<a href="#inspect">inspect</a>
@@ -213,6 +213,7 @@ imports:
&#8226; <a href="#sys">sys</a>
&#8226; <a href="#tkinter">tkinter</a>
&#8226; <a href="#tkinter.filedialog">tkinter.filedialog</a>
&#8226; <a href="#tkinter.font">tkinter.font</a>
&#8226; <a href="#tkinter.messagebox">tkinter.messagebox</a>
&#8226; <a href="#tkinter.ttk">tkinter.ttk</a>
&#8226; <a href="#traceback">traceback</a>
@@ -5710,6 +5711,7 @@ imported by:
&#8226; <a href="#reprlib">reprlib</a>
&#8226; <a href="#statistics">statistics</a>
&#8226; <a href="#threading">threading</a>
&#8226; <a href="#tkinter.font">tkinter.font</a>
&#8226; <a href="#tokenize">tokenize</a>
&#8226; <a href="#traceback">traceback</a>
&#8226; <a href="#weakref">weakref</a>
@@ -6358,7 +6360,7 @@ imported by:
<div class="node">
<a name="pypinyin"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/__init__.py" type="text/plain"><tt>pypinyin</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/__init__.py" type="text/plain"><tt>pypinyin</tt></a>
<span class="moduletype">Package</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6396,7 +6398,7 @@ imported by:
<div class="node">
<a name="pypinyin.compat"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/compat.py" type="text/plain"><tt>pypinyin.compat</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/compat.py" type="text/plain"><tt>pypinyin.compat</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6418,7 +6420,7 @@ imported by:
<div class="node">
<a name="pypinyin.constants"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/constants.py" type="text/plain"><tt>pypinyin.constants</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/constants.py" type="text/plain"><tt>pypinyin.constants</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6453,7 +6455,7 @@ imported by:
<div class="node">
<a name="pypinyin.contrib"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/contrib/__init__.py" type="text/plain"><tt>pypinyin.contrib</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/contrib/__init__.py" type="text/plain"><tt>pypinyin.contrib</tt></a>
<span class="moduletype">Package</span> <div class="import">
imports:
<a href="#pypinyin">pypinyin</a>
@@ -6473,7 +6475,7 @@ imported by:
<div class="node">
<a name="pypinyin.contrib._tone_rule"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/contrib/_tone_rule.py" type="text/plain"><tt>pypinyin.contrib._tone_rule</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/contrib/_tone_rule.py" type="text/plain"><tt>pypinyin.contrib._tone_rule</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6491,7 +6493,7 @@ imported by:
<div class="node">
<a name="pypinyin.contrib.neutral_tone"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/contrib/neutral_tone.py" type="text/plain"><tt>pypinyin.contrib.neutral_tone</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/contrib/neutral_tone.py" type="text/plain"><tt>pypinyin.contrib.neutral_tone</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6511,7 +6513,7 @@ imported by:
<div class="node">
<a name="pypinyin.contrib.tone_convert"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/contrib/tone_convert.py" type="text/plain"><tt>pypinyin.contrib.tone_convert</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/contrib/tone_convert.py" type="text/plain"><tt>pypinyin.contrib.tone_convert</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6530,7 +6532,7 @@ imported by:
<div class="node">
<a name="pypinyin.contrib.tone_sandhi"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/contrib/tone_sandhi.py" type="text/plain"><tt>pypinyin.contrib.tone_sandhi</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/contrib/tone_sandhi.py" type="text/plain"><tt>pypinyin.contrib.tone_sandhi</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6550,7 +6552,7 @@ imported by:
<div class="node">
<a name="pypinyin.contrib.uv"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/contrib/uv.py" type="text/plain"><tt>pypinyin.contrib.uv</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/contrib/uv.py" type="text/plain"><tt>pypinyin.contrib.uv</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6567,7 +6569,7 @@ imported by:
<div class="node">
<a name="pypinyin.converter"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/converter.py" type="text/plain"><tt>pypinyin.converter</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/converter.py" type="text/plain"><tt>pypinyin.converter</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6593,7 +6595,7 @@ imported by:
<div class="node">
<a name="pypinyin.core"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/core.py" type="text/plain"><tt>pypinyin.core</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/core.py" type="text/plain"><tt>pypinyin.core</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6619,7 +6621,7 @@ imported by:
<div class="node">
<a name="pypinyin.exceptions"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/exceptions.py" type="text/plain"><tt>pypinyin.exceptions</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/exceptions.py" type="text/plain"><tt>pypinyin.exceptions</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6636,7 +6638,7 @@ imported by:
<div class="node">
<a name="pypinyin.phonetic_symbol"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/phonetic_symbol.py" type="text/plain"><tt>pypinyin.phonetic_symbol</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/phonetic_symbol.py" type="text/plain"><tt>pypinyin.phonetic_symbol</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6655,7 +6657,7 @@ imported by:
<div class="node">
<a name="pypinyin.phrases_dict"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/phrases_dict.py" type="text/plain"><tt>pypinyin.phrases_dict</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/phrases_dict.py" type="text/plain"><tt>pypinyin.phrases_dict</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6676,7 +6678,7 @@ imported by:
<div class="node">
<a name="pypinyin.pinyin_dict"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/pinyin_dict.py" type="text/plain"><tt>pypinyin.pinyin_dict</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/pinyin_dict.py" type="text/plain"><tt>pypinyin.pinyin_dict</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6697,7 +6699,7 @@ imported by:
<div class="node">
<a name="pypinyin.seg"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/seg/__init__.py" type="text/plain"><tt>pypinyin.seg</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/seg/__init__.py" type="text/plain"><tt>pypinyin.seg</tt></a>
<span class="moduletype">Package</span> <div class="import">
imports:
<a href="#pypinyin">pypinyin</a>
@@ -6716,7 +6718,7 @@ imported by:
<div class="node">
<a name="pypinyin.seg.mmseg"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/seg/mmseg.py" type="text/plain"><tt>pypinyin.seg.mmseg</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/seg/mmseg.py" type="text/plain"><tt>pypinyin.seg.mmseg</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#pypinyin.constants">pypinyin.constants</a>
@@ -6735,7 +6737,7 @@ imported by:
<div class="node">
<a name="pypinyin.seg.simpleseg"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/seg/simpleseg.py" type="text/plain"><tt>pypinyin.seg.simpleseg</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/seg/simpleseg.py" type="text/plain"><tt>pypinyin.seg.simpleseg</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6757,7 +6759,7 @@ imported by:
<div class="node">
<a name="pypinyin.standard"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/standard.py" type="text/plain"><tt>pypinyin.standard</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/standard.py" type="text/plain"><tt>pypinyin.standard</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6776,7 +6778,7 @@ imported by:
<div class="node">
<a name="pypinyin.style"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/style/__init__.py" type="text/plain"><tt>pypinyin.style</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/style/__init__.py" type="text/plain"><tt>pypinyin.style</tt></a>
<span class="moduletype">Package</span> <div class="import">
imports:
<a href="#functools">functools</a>
@@ -6815,7 +6817,7 @@ imported by:
<div class="node">
<a name="pypinyin.style._constants"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/style/_constants.py" type="text/plain"><tt>pypinyin.style._constants</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/style/_constants.py" type="text/plain"><tt>pypinyin.style._constants</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6841,7 +6843,7 @@ imported by:
<div class="node">
<a name="pypinyin.style._tone_convert"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/style/_tone_convert.py" type="text/plain"><tt>pypinyin.style._tone_convert</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/style/_tone_convert.py" type="text/plain"><tt>pypinyin.style._tone_convert</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6867,7 +6869,7 @@ imported by:
<div class="node">
<a name="pypinyin.style._tone_rule"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/style/_tone_rule.py" type="text/plain"><tt>pypinyin.style._tone_rule</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/style/_tone_rule.py" type="text/plain"><tt>pypinyin.style._tone_rule</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6885,7 +6887,7 @@ imported by:
<div class="node">
<a name="pypinyin.style._utils"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/style/_utils.py" type="text/plain"><tt>pypinyin.style._utils</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/style/_utils.py" type="text/plain"><tt>pypinyin.style._utils</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6911,7 +6913,7 @@ imported by:
<div class="node">
<a name="pypinyin.style.bopomofo"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/style/bopomofo.py" type="text/plain"><tt>pypinyin.style.bopomofo</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/style/bopomofo.py" type="text/plain"><tt>pypinyin.style.bopomofo</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6932,7 +6934,7 @@ imported by:
<div class="node">
<a name="pypinyin.style.cyrillic"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/style/cyrillic.py" type="text/plain"><tt>pypinyin.style.cyrillic</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/style/cyrillic.py" type="text/plain"><tt>pypinyin.style.cyrillic</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6953,7 +6955,7 @@ imported by:
<div class="node">
<a name="pypinyin.style.finals"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/style/finals.py" type="text/plain"><tt>pypinyin.style.finals</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/style/finals.py" type="text/plain"><tt>pypinyin.style.finals</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6972,7 +6974,7 @@ imported by:
<div class="node">
<a name="pypinyin.style.gwoyeu"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/style/gwoyeu.py" type="text/plain"><tt>pypinyin.style.gwoyeu</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/style/gwoyeu.py" type="text/plain"><tt>pypinyin.style.gwoyeu</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -6993,7 +6995,7 @@ imported by:
<div class="node">
<a name="pypinyin.style.initials"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/style/initials.py" type="text/plain"><tt>pypinyin.style.initials</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/style/initials.py" type="text/plain"><tt>pypinyin.style.initials</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -7012,7 +7014,7 @@ imported by:
<div class="node">
<a name="pypinyin.style.others"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/style/others.py" type="text/plain"><tt>pypinyin.style.others</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/style/others.py" type="text/plain"><tt>pypinyin.style.others</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -7031,7 +7033,7 @@ imported by:
<div class="node">
<a name="pypinyin.style.tone"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/style/tone.py" type="text/plain"><tt>pypinyin.style.tone</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/style/tone.py" type="text/plain"><tt>pypinyin.style.tone</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -7052,7 +7054,7 @@ imported by:
<div class="node">
<a name="pypinyin.style.wadegiles"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/style/wadegiles.py" type="text/plain"><tt>pypinyin.style.wadegiles</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/style/wadegiles.py" type="text/plain"><tt>pypinyin.style.wadegiles</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -7071,7 +7073,7 @@ imported by:
<div class="node">
<a name="pypinyin.utils"></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/venv_purposed_apps/Lib/site-packages/pypinyin/utils.py" type="text/plain"><tt>pypinyin.utils</tt></a>
<a target="code" href="///D:/NETWORK_SYNC/0_DAILY/CodeProjects/purposed_apps/RollCall_App/rollcall/Lib/site-packages/pypinyin/utils.py" type="text/plain"><tt>pypinyin.utils</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#__future__">__future__</a>
@@ -7889,6 +7891,7 @@ imported by:
&#8226; <a href="#tkinter.constants">tkinter.constants</a>
&#8226; <a href="#tkinter.dialog">tkinter.dialog</a>
&#8226; <a href="#tkinter.filedialog">tkinter.filedialog</a>
&#8226; <a href="#tkinter.font">tkinter.font</a>
&#8226; <a href="#tkinter.messagebox">tkinter.messagebox</a>
&#8226; <a href="#tkinter.simpledialog">tkinter.simpledialog</a>
&#8226; <a href="#tkinter.ttk">tkinter.ttk</a>
@@ -7971,6 +7974,23 @@ imported by:
</div>
<div class="node">
<a name="tkinter.font"></a>
<a target="code" href="///C:/Users/Yuxing/AppData/Local/Programs/Python/Python313/Lib/tkinter/font.py" type="text/plain"><tt>tkinter.font</tt></a>
<span class="moduletype">SourceModule</span> <div class="import">
imports:
<a href="#itertools">itertools</a>
&#8226; <a href="#tkinter">tkinter</a>
</div>
<div class="import">
imported by:
<a href="#课堂随机点名.py">课堂随机点名.py</a>
</div>
</div>
<div class="node">
<a name="tkinter.messagebox"></a>
<a target="code" href="///C:/Users/Yuxing/AppData/Local/Programs/Python/Python313/Lib/tkinter/messagebox.py" type="text/plain"><tt>tkinter.messagebox</tt></a>

Binary file not shown.

View File

@@ -15,8 +15,8 @@ class RollCallApp:
master.title("课堂随机点名系统")
# --- Base dimensions for scaling ---
self._default_width = 640 # MODIFIED
self._default_height = 480 # MODIFIED
self._default_width = 640
self._default_height = 480
master.minsize(width=self._default_width, height=self._default_height)
master.geometry(f"{self._default_width}x{self._default_height}")
@@ -42,13 +42,13 @@ class RollCallApp:
self.font_family_display = "华文中宋"
# --- Define BASE Font Sizes (will be scaled) ---
self.base_font_size_standard = 10 # MODIFIED from 14
self.base_font_size_counter = 12 # MODIFIED from 18
self.base_font_size_display = 26 # MODIFIED from 42
self.base_font_size_pinyin_display = 16 # MODIFIED from 28
self.base_font_size_title = 16 # MODIFIED from 28
self.base_font_size_footer = 8 # MODIFIED from 11
self.base_font_size_button = self.base_font_size_standard # Remains consistent
self.base_font_size_standard = 10
self.base_font_size_counter = 12
self.base_font_size_display = 26
self.base_font_size_pinyin_display = 16
self.base_font_size_title = 16
self.base_font_size_footer = 8
self.base_font_size_button = self.base_font_size_standard
# --- Current font sizes ---
self.font_size_standard = self.base_font_size_standard
@@ -69,45 +69,55 @@ class RollCallApp:
self.font_footer_tuple = (self.font_family_ui, self.font_size_footer)
# --- Base widget dimension/padding values for scaling ---
self.base_pady_name_display = 6 # MODIFIED from 10
self.base_button_padding = (8, 5) # MODIFIED from (12, 7)
self.base_entry_padding = (2, 2) # MODIFIED from (3, 3)
self.base_duration_slider_length = 160 # MODIFIED from 250
self.base_speed_slider_length = 160 # MODIFIED from 250
self.base_pady_name_display = 6
self.base_button_padding = (8, 5)
self.base_entry_padding = (2, 2)
self.base_duration_slider_length = 160
self.base_speed_slider_length = 160
# --- Scaling related attributes ---
self.last_scale_factor = 1.0
self.resize_timer = None
self._fonts_scaled_at_least_once = False
# --- Style and Colors ---
# --- Theme and Colors ---
self.current_theme = "light" # "light" or "dark"
self.themes_colors = {
"light": {
"background": "#ECEFF1", "text": "#263238",
"primary": "#007BFF", "primary_dark": "#0056b3", "primary_hover": "#0069D9",
"primary_text": "#FFFFFF", "secondary_bg": "#FFFFFF", "border": "#B0BEC5",
"disabled_fg": "#78909C", "disabled_bg": "#CFD8DC",
"title_label_fg": "#007BFF",
"footer_text": "#546E7A",
"name_display_default_fg": "#263238",
"name_display_default_bg": "#FFFFFF",
"name_display_flash_fg": "#263238",
"name_display_flash_bg": "#FFF9C4",
"name_display_selected_fg": "#2E7D32", "name_display_selected_bg": "#C8E6C9",
"name_display_absent_fg": "#C62828", "name_display_absent_bg": "#FFCDD2",
},
"dark": {
"background": "#2D2D2D", "text": "#E0E0E0",
"primary": "#448AFF", "primary_dark": "#2962FF", "primary_hover": "#5393FF",
"primary_text": "#FFFFFF", "secondary_bg": "#373737", "border": "#505050",
"disabled_fg": "#888888", "disabled_bg": "#454545",
"title_label_fg": "#448AFF",
"footer_text": "#A0A0A0",
"name_display_default_fg": "#E0E0E0",
"name_display_default_bg": "#373737",
"name_display_flash_fg": "#FFE082", "name_display_flash_bg": "#4A3F23",
"name_display_selected_fg": "#A5D6A7", "name_display_selected_bg": "#1B5E20",
"name_display_absent_fg": "#EF9A9A", "name_display_absent_bg": "#B71C1C",
}
}
self.style = ttk.Style(master)
try:
self.style.theme_use('clam')
except tk.TclError:
print("Clam theme not available, using default theme. Styling will still be applied.")
self.COLOR_BACKGROUND = "#ECEFF1"
self.COLOR_TEXT = "#263238"
self.COLOR_PRIMARY = "#007BFF"
self.COLOR_PRIMARY_DARK = "#0056b3"
self.COLOR_PRIMARY_HOVER = "#0069D9"
self.COLOR_PRIMARY_TEXT = "#FFFFFF"
self.COLOR_SECONDARY_BG = "#FFFFFF"
self.COLOR_BORDER = "#B0BEC5"
self.COLOR_DISABLED_FG = "#78909C"
self.COLOR_DISABLED_BG = "#CFD8DC"
self.COLOR_NAME_DISPLAY_DEFAULT_BG = self.COLOR_SECONDARY_BG
self.COLOR_NAME_DISPLAY_DEFAULT_FG = self.COLOR_TEXT
self.COLOR_NAME_DISPLAY_FLASH_BG = "#FFF9C4"
self.COLOR_NAME_DISPLAY_FLASH_FG = self.COLOR_TEXT
self.COLOR_NAME_DISPLAY_SELECTED_BG = "#C8E6C9"
self.COLOR_NAME_DISPLAY_SELECTED_FG = "#2E7D32"
self.COLOR_NAME_DISPLAY_ABSENT_BG = "#FFCDD2"
self.COLOR_NAME_DISPLAY_ABSENT_FG = "#C62828"
master.configure(bg=self.COLOR_BACKGROUND)
# --- Data storage ---
self.all_students = []
self.remaining_students = []
@@ -122,29 +132,26 @@ class RollCallApp:
self.flash_interval_var = tk.IntVar(value=25)
# --- UI Elements ---
self.footer_label = ttk.Label(
master,
text="Ver. 2.6 @杨昱幸. All Rights Reserved.",
master, # Parent is master
text="Ver. 2.7 @杨昱幸. All Rights Reserved.",
style="Footer.TLabel",
anchor='center'
)
self.main_content_frame = ttk.Frame(master, style="TFrame")
self.main_content_frame = ttk.Frame(master, style="TFrame") # Parent is master
self.title_label = ttk.Label(self.main_content_frame, text="课堂随机点名系统", style="Title.TLabel")
self.title_label.pack(pady=(10, 5)) # MODIFIED pady
self.title_label.pack(pady=(10, 5))
self.counter_label = ttk.Label(self.main_content_frame, text="已点: 0 人/总共0人", style="Counter.TLabel") # MODIFIED text
self.counter_label.pack(pady=(0, 8)) # MODIFIED pady
self.counter_label = ttk.Label(self.main_content_frame, text="已点: 0 人/总共0人", style="Counter.TLabel")
self.counter_label.pack(pady=(0, 8))
self.name_display_border_frame = tk.Frame(self.main_content_frame, background=self.COLOR_BORDER, relief="flat", bd=1)
self.name_display_border_frame.pack(pady=5, padx=15, fill=tk.X) # MODIFIED pady and padx
self.name_display_border_frame = tk.Frame(self.main_content_frame, relief="flat", bd=1)
self.name_display_border_frame.pack(pady=5, padx=15, fill=tk.X)
self.name_display = tk.Text(self.name_display_border_frame,
font=self.font_display_tuple,
bg=self.COLOR_NAME_DISPLAY_DEFAULT_BG,
fg=self.COLOR_NAME_DISPLAY_DEFAULT_FG,
wrap=tk.NONE,
height=2,
relief="flat", bd=0,
@@ -154,64 +161,81 @@ class RollCallApp:
self.name_display.pack(fill=tk.X, padx=1, pady=1)
self.current_name_display_content_tuple = ("请先加载名单", "", "")
self.current_name_display_fg = self.COLOR_NAME_DISPLAY_DEFAULT_FG
self.current_name_display_bg = self.COLOR_NAME_DISPLAY_DEFAULT_BG
self.current_name_display_fg_key = "name_display_default_fg"
self.current_name_display_bg_key = "name_display_default_bg"
self.current_name_display_is_placeholder = True
flash_control_frame = ttk.Frame(self.main_content_frame, style="TFrame")
flash_control_frame.pack(pady=8, fill=tk.X, padx=15) # MODIFIED pady and padx
flash_control_frame.pack(pady=8, fill=tk.X, padx=15)
duration_frame = ttk.Frame(flash_control_frame)
duration_frame.pack(pady=3, anchor='center') # MODIFIED pady
ttk.Label(duration_frame, text="闪烁时间 (秒):").pack(side=tk.LEFT, padx=(0,5)) # MODIFIED padx
duration_frame.pack(pady=3, anchor='center')
ttk.Label(duration_frame, text="闪烁时间 (秒):").pack(side=tk.LEFT, padx=(0,5))
self.duration_slider = ttk.Scale(duration_frame, from_=1, to=5, orient=tk.HORIZONTAL,
variable=self.flash_duration_var, length=self.base_duration_slider_length,
command=lambda v: self.flash_duration_var.set(int(float(v))),
style="Horizontal.TScale")
self.duration_slider.pack(side=tk.LEFT, padx=3) # MODIFIED padx
self.duration_label = ttk.Label(duration_frame, textvariable=self.flash_duration_var, width=2, style="Value.TLabel") # MODIFIED width
self.duration_slider.pack(side=tk.LEFT, padx=3)
self.duration_label = ttk.Label(duration_frame, textvariable=self.flash_duration_var, width=2, style="Value.TLabel")
self.duration_label.pack(side=tk.LEFT)
self.duration_slider.config(state=tk.DISABLED)
interval_frame = ttk.Frame(flash_control_frame)
interval_frame.pack(pady=3, anchor='center') # MODIFIED pady
ttk.Label(interval_frame, text="闪烁间隔 (毫秒):").pack(side=tk.LEFT, padx=(0,5)) # MODIFIED padx
interval_frame.pack(pady=3, anchor='center')
ttk.Label(interval_frame, text="闪烁间隔 (毫秒):").pack(side=tk.LEFT, padx=(0,5))
self.speed_interval_slider = ttk.Scale(interval_frame, from_=25, to=300, orient=tk.HORIZONTAL,
variable=self.flash_interval_var, length=self.base_speed_slider_length,
command=lambda v: self.flash_interval_var.set(int(float(v))),
style="Horizontal.TScale")
self.speed_interval_slider.pack(side=tk.LEFT, padx=3) # MODIFIED padx
self.interval_label = ttk.Label(interval_frame, textvariable=self.flash_interval_var, width=3, style="Value.TLabel") # MODIFIED width
self.speed_interval_slider.pack(side=tk.LEFT, padx=3)
self.interval_label = ttk.Label(interval_frame, textvariable=self.flash_interval_var, width=3, style="Value.TLabel")
self.interval_label.pack(side=tk.LEFT)
self.speed_interval_slider.config(state=tk.DISABLED)
file_frame = ttk.Frame(self.main_content_frame)
file_frame.pack(pady=10, padx=15) # MODIFIED pady and padx
ttk.Label(file_frame, text="TXT名单 (一行一个'学号,姓名'):").pack(side=tk.LEFT, padx=(0,5)) # MODIFIED text and padx
self.file_entry = ttk.Entry(file_frame, textvariable=self.file_path, width=18, state='readonly') # MODIFIED width
self.file_entry.pack(side=tk.LEFT, padx=3) # MODIFIED padx
file_frame.pack(pady=10, padx=15)
ttk.Label(file_frame, text="TXT名单 (一行一个'学号,姓名'):").pack(side=tk.LEFT, padx=(0,5))
self.file_entry = ttk.Entry(file_frame, textvariable=self.file_path, width=18, state='readonly')
self.file_entry.pack(side=tk.LEFT, padx=3)
self.load_button = ttk.Button(file_frame, text="选择文件", command=self.load_file)
self.load_button.pack(side=tk.LEFT, padx=(3,0)) # MODIFIED padx
self.load_button.pack(side=tk.LEFT, padx=(3,0))
button_frame = ttk.Frame(self.main_content_frame)
button_frame.pack(pady=10) # MODIFIED pady
button_frame.pack(pady=10)
self.start_button = ttk.Button(button_frame, text="开始点名", command=self.start_roll_call, state=tk.DISABLED)
self.start_button.grid(row=0, column=0, padx=5, pady=4) # MODIFIED padx and pady
self.start_button.grid(row=0, column=0, padx=5, pady=4)
self.mark_absent_button = ttk.Button(button_frame, text="标记未到场", command=self.mark_absent, state=tk.DISABLED)
self.mark_absent_button.grid(row=0, column=1, padx=5, pady=4) # MODIFIED padx and pady
self.mark_absent_button.grid(row=0, column=1, padx=5, pady=4)
self.export_button = ttk.Button(button_frame, text="导出未到场(CSV)", command=self.export_absent_list, state=tk.DISABLED)
self.export_button.grid(row=1, column=0, padx=5, pady=4) # MODIFIED padx and pady
self.export_button.grid(row=1, column=0, padx=5, pady=4)
self.clear_button = ttk.Button(button_frame, text="清空考勤数据", command=self.clear_data, state=tk.DISABLED)
self.clear_button.grid(row=1, column=1, padx=5, pady=4) # MODIFIED padx and pady
self.clear_button.grid(row=1, column=1, padx=5, pady=4)
self.theme_toggle_button = ttk.Button(button_frame, text="切换至深色模式", command=self.toggle_theme)
self.theme_toggle_button.grid(row=2, column=0, columnspan=2, padx=5, pady=4, sticky="ew")
# --- Pack main frames into master window ---
# Pack footer first to reserve its space at the bottom
self.footer_label.pack(side=tk.BOTTOM, fill=tk.X, pady=(5,5))
# Then pack the main content frame to take the remaining space above the footer
self.main_content_frame.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
self.footer_label.pack(side=tk.BOTTOM, fill=tk.X, pady=(5,5)) # MODIFIED pady
self._update_all_fonts_and_widgets(1.0)
self._update_all_fonts_and_widgets(1.0)
self._set_name_display_text("请先加载名单", is_placeholder=True)
self.update_counter()
self.master.bind("<Configure>", self.on_window_resize)
def toggle_theme(self):
self.current_theme = "dark" if self.current_theme == "light" else "light"
if self.current_theme == "dark":
self.theme_toggle_button.config(text="切换至浅色模式")
else:
self.theme_toggle_button.config(text="切换至深色模式")
self._update_all_fonts_and_widgets(self.last_scale_factor)
self._render_name_display()
def on_window_resize(self, event=None):
if event and event.widget != self.master:
@@ -227,10 +251,9 @@ class RollCallApp:
return
scale_w = current_width / self._default_width
scale_h = current_height / self._default_height
scale_factor = (scale_w + scale_h) / 2.0
# scale_factor = (scale_w + scale_h) / 2.0
scale_factor = min(scale_w,scale_h)
# Prevent fonts from becoming too tiny if window is drastically shrunk
# (though minsize should prevent this for user actions)
if scale_factor < 0.2:
scale_factor = 0.2
@@ -243,7 +266,12 @@ class RollCallApp:
def _update_all_fonts_and_widgets(self, scale_factor):
MIN_FONT_SIZE = 6 # MODIFIED slightly, given smaller base fonts
colors = self.themes_colors[self.current_theme]
self.master.configure(bg=colors['background'])
self.name_display_border_frame.config(background=colors['border'])
MIN_FONT_SIZE = 6
self.font_size_standard = max(MIN_FONT_SIZE, int(self.base_font_size_standard * scale_factor))
self.font_size_counter = max(MIN_FONT_SIZE, int(self.base_font_size_counter * scale_factor))
self.font_size_display = max(MIN_FONT_SIZE + 4, int(self.base_font_size_display * scale_factor))
@@ -261,40 +289,62 @@ class RollCallApp:
self.font_footer_tuple = (self.font_family_ui, self.font_size_footer)
scaled_button_padding = (
max(2, int(self.base_button_padding[0] * scale_factor)), # MODIFIED min padx
max(1, int(self.base_button_padding[1] * scale_factor)) # MODIFIED min pady
max(2, int(self.base_button_padding[0] * scale_factor)),
max(1, int(self.base_button_padding[1] * scale_factor))
)
scaled_entry_padding = (
max(1, int(self.base_entry_padding[0] * scale_factor)),
max(1, int(self.base_entry_padding[1] * scale_factor))
)
scaled_duration_slider_length = max(60, int(self.base_duration_slider_length * scale_factor)) # MODIFIED min length
scaled_speed_slider_length = max(60, int(self.base_speed_slider_length * scale_factor)) # MODIFIED min length
scaled_duration_slider_length = max(60, int(self.base_duration_slider_length * scale_factor))
scaled_speed_slider_length = max(60, int(self.base_speed_slider_length * scale_factor))
self.style.configure(".", background=colors['background'], foreground=colors['text'], font=self.font_standard_tuple)
self.style.configure("TFrame", background=colors['background'])
# Ensure all labels get theme colors explicitly
for child in self.main_content_frame.winfo_children(): # Apply to labels in main_content_frame
if isinstance(child, ttk.Label):
child.configure(background=colors['background'], foreground=colors['text'])
elif isinstance(child, ttk.Frame): # Apply to labels in sub-frames like flash_control_frame
for sub_child in child.winfo_children():
if isinstance(sub_child, ttk.Label):
sub_child.configure(background=colors['background'], foreground=colors['text'])
elif isinstance(sub_child, ttk.Frame): # Apply to labels in sub-sub-frames
for sub_sub_child in sub_child.winfo_children():
if isinstance(sub_sub_child, ttk.Label):
sub_sub_child.configure(background=colors['background'], foreground=colors['text'])
self.style.configure("TLabel", background=colors['background'], foreground=colors['text'], font=self.font_standard_tuple) # Default for other TLabels
self.style.configure("Title.TLabel", font=self.font_title_tuple, foreground=colors['title_label_fg'], background=colors['background'])
self.style.configure("Counter.TLabel", font=self.font_counter_tuple, background=colors['background'], foreground=colors['text'])
self.style.configure("Value.TLabel", font=self.font_standard_tuple, background=colors['background'], foreground=colors['text']) # For slider value labels
self.style.configure("Footer.TLabel", font=self.font_footer_tuple, foreground=colors['footer_text'], background=colors['background'])
# Re-apply specific styles to ensure they override generic TFrame/TLabel iteration above
self.title_label.configure(style="Title.TLabel")
self.counter_label.configure(style="Counter.TLabel")
if hasattr(self, 'duration_label'): self.duration_label.configure(style="Value.TLabel")
if hasattr(self, 'interval_label'): self.interval_label.configure(style="Value.TLabel")
if hasattr(self, 'footer_label'): self.footer_label.configure(style="Footer.TLabel")
self.style.configure(".", background=self.COLOR_BACKGROUND, foreground=self.COLOR_TEXT, font=self.font_standard_tuple)
self.style.configure("TFrame", background=self.COLOR_BACKGROUND)
self.style.configure("TLabel", background=self.COLOR_BACKGROUND, foreground=self.COLOR_TEXT, font=self.font_standard_tuple)
self.style.configure("Title.TLabel", font=self.font_title_tuple, foreground=self.COLOR_PRIMARY)
self.style.configure("Counter.TLabel", font=self.font_counter_tuple)
self.style.configure("Value.TLabel", font=self.font_standard_tuple)
self.style.configure("Footer.TLabel", font=self.font_footer_tuple, foreground="#546E7A")
self.style.configure("TButton", font=self.font_button_tuple, padding=scaled_button_padding)
self.style.map("TButton",
foreground=[('disabled', self.COLOR_DISABLED_FG), ('pressed', self.COLOR_PRIMARY_TEXT),
('active', self.COLOR_PRIMARY_TEXT), ('!disabled', self.COLOR_PRIMARY_TEXT)],
background=[('disabled', self.COLOR_DISABLED_BG), ('pressed', self.COLOR_PRIMARY_DARK),
('active', self.COLOR_PRIMARY_HOVER), ('!disabled', self.COLOR_PRIMARY)],
foreground=[('disabled', colors['disabled_fg']), ('pressed', colors['primary_text']),
('active', colors['primary_text']), ('!disabled', colors['primary_text'])],
background=[('disabled', colors['disabled_bg']), ('pressed', colors['primary_dark']),
('active', colors['primary_hover']), ('!disabled', colors['primary'])],
relief=[('pressed', 'sunken'), ('!pressed', 'raised')])
self.style.configure("TEntry", font=self.font_standard_tuple, fieldbackground=self.COLOR_SECONDARY_BG,
relief="flat", padding=scaled_entry_padding)
self.style.configure("TEntry", font=self.font_standard_tuple, fieldbackground=colors['secondary_bg'],
foreground=colors['text'], relief="flat", padding=scaled_entry_padding,
bordercolor=colors['border'], lightcolor=colors['primary'], borderwidth=1)
self.style.map("TEntry",
bordercolor=[('focus', self.COLOR_PRIMARY), ('!focus', self.COLOR_BORDER)],
borderwidth=[('focus', 1), ('!focus', 1)],
lightcolor=[('focus', self.COLOR_PRIMARY)])
bordercolor=[('focus', colors['primary']), ('!focus', colors['border'])],
lightcolor=[('focus', colors['primary'])])
self.style.configure("Horizontal.TScale", background=self.COLOR_BACKGROUND, troughcolor=self.COLOR_SECONDARY_BG)
self.style.configure("Horizontal.TScale", background=colors['background'], troughcolor=colors['secondary_bg'])
self.duration_slider.config(length=scaled_duration_slider_length)
self.speed_interval_slider.config(length=scaled_speed_slider_length)
@@ -303,38 +353,44 @@ class RollCallApp:
self._render_name_display(scale_factor)
def _set_name_display_text(self, text_content, fg_color=None, bg_color=None, is_placeholder=False):
def _set_name_display_text(self, text_content, fg_color_key_override=None, bg_color_key_override=None, is_placeholder=False):
if is_placeholder:
self.current_name_display_content_tuple = (str(text_content), "", "")
self.current_name_display_fg_key = "name_display_default_fg"
self.current_name_display_bg_key = "name_display_default_bg"
else:
if isinstance(text_content, tuple) and len(text_content) == 3:
self.current_name_display_content_tuple = text_content
else:
else:
self.current_name_display_content_tuple = (str(text_content), "", "")
is_placeholder = True
is_placeholder = True
if fg_color_key_override and bg_color_key_override:
self.current_name_display_fg_key = fg_color_key_override
self.current_name_display_bg_key = bg_color_key_override
else:
self.current_name_display_fg_key = "name_display_default_fg"
self.current_name_display_bg_key = "name_display_default_bg"
self.current_name_display_fg = fg_color
self.current_name_display_bg = bg_color
self.current_name_display_is_placeholder = is_placeholder
self._render_name_display()
def _render_name_display(self, scale_factor_for_pady=None):
if scale_factor_for_pady is None:
scale_factor_for_pady = self.last_scale_factor
active_theme_colors = self.themes_colors[self.current_theme]
text_tuple = self.current_name_display_content_tuple
fg_color = self.current_name_display_fg
bg_color = self.current_name_display_bg
current_fg_color = active_theme_colors[self.current_name_display_fg_key]
current_bg_color = active_theme_colors[self.current_name_display_bg_key]
is_placeholder = self.current_name_display_is_placeholder
self.name_display.config(state=tk.NORMAL)
self.name_display.delete("1.0", tk.END)
current_bg_color = bg_color if bg_color is not None else self.COLOR_NAME_DISPLAY_DEFAULT_BG
current_fg_color = fg_color if fg_color is not None else self.COLOR_NAME_DISPLAY_DEFAULT_FG
scaled_pady_name_display = max(2, int(self.base_pady_name_display * scale_factor_for_pady)) # MODIFIED min pady
scaled_pady_name_display = max(2, int(self.base_pady_name_display * scale_factor_for_pady))
self.name_display.config(bg=current_bg_color, pady=scaled_pady_name_display)
self.name_display.tag_configure("main_name", font=self.font_display_tuple, foreground=current_fg_color)
@@ -358,7 +414,7 @@ class RollCallApp:
self.name_display.insert(tk.END, "\n")
self.name_display.insert(tk.END, second_line_str, ("center", "pinyin"))
self.name_display.config(height=2)
self.name_display.config(height=2)
self.name_display.config(state=tk.DISABLED)
@@ -465,7 +521,7 @@ class RollCallApp:
def update_counter(self):
total = len(self.all_students)
called_count = len(self.called_students) + len(self.absent_students)
self.counter_label.config(text=f"已点: {called_count}人/总共{total}") # MODIFIED text
self.counter_label.config(text=f"已点: {called_count}人/总共{total}")
def start_roll_call(self):
@@ -473,8 +529,8 @@ class RollCallApp:
return
if not self.remaining_students:
self._set_name_display_text("所有学生已点完!",
fg_color=self.COLOR_NAME_DISPLAY_SELECTED_FG,
bg_color=self.COLOR_NAME_DISPLAY_SELECTED_BG,
fg_color_key_override="name_display_selected_fg",
bg_color_key_override="name_display_selected_bg",
is_placeholder=True)
messagebox.showinfo("提示", "所有学生均已点名。")
self.start_button.config(state=tk.DISABLED)
@@ -488,6 +544,8 @@ class RollCallApp:
self.export_button.config(state=tk.DISABLED)
self.duration_slider.config(state=tk.DISABLED)
self.speed_interval_slider.config(state=tk.DISABLED)
self.theme_toggle_button.config(state=tk.DISABLED)
self.is_flashing = True
self._flash_name()
@@ -506,20 +564,20 @@ class RollCallApp:
pinyin_text = display_student[2]
self._set_name_display_text((base_text, pinyin_text, ""),
fg_color=self.COLOR_NAME_DISPLAY_FLASH_FG,
bg_color=self.COLOR_NAME_DISPLAY_FLASH_BG)
fg_color_key_override="name_display_flash_fg",
bg_color_key_override="name_display_flash_bg")
flash_interval_ms = self.flash_interval_var.get()
self.flash_timer = self.master.after(flash_interval_ms, self._flash_name)
def stop_flashing(self):
if not self.is_flashing:
if not self.is_flashing:
return
if self.flash_timer:
self.master.after_cancel(self.flash_timer)
self.flash_timer = None
if self.stop_timer:
if self.stop_timer:
self.master.after_cancel(self.stop_timer)
self.stop_timer = None
@@ -527,21 +585,23 @@ class RollCallApp:
self._select_final_student()
def _select_final_student(self):
if self.is_flashing:
if self.is_flashing:
self.is_flashing = False
if self.flash_timer: self.master.after_cancel(self.flash_timer); self.flash_timer = None
if self.stop_timer: self.master.after_cancel(self.stop_timer); self.stop_timer = None
self.load_button.config(state=tk.NORMAL)
self.clear_button.config(state=tk.NORMAL)
self.theme_toggle_button.config(state=tk.NORMAL)
can_enable_sliders = bool(self.all_students)
self.duration_slider.config(state=tk.NORMAL if can_enable_sliders else tk.DISABLED)
self.speed_interval_slider.config(state=tk.NORMAL if can_enable_sliders else tk.DISABLED)
if not self.remaining_students:
self._set_name_display_text("所有学生已点完!",
fg_color=self.COLOR_NAME_DISPLAY_SELECTED_FG,
bg_color=self.COLOR_NAME_DISPLAY_SELECTED_BG,
fg_color_key_override="name_display_selected_fg",
bg_color_key_override="name_display_selected_bg",
is_placeholder=True)
self.start_button.config(state=tk.DISABLED)
self.mark_absent_button.config(state=tk.DISABLED)
@@ -562,8 +622,8 @@ class RollCallApp:
self.start_button.config(state=tk.NORMAL)
self._set_name_display_text((base_text, pinyin_text, suffix_text),
fg_color=self.COLOR_NAME_DISPLAY_SELECTED_FG,
bg_color=self.COLOR_NAME_DISPLAY_SELECTED_BG)
fg_color_key_override="name_display_selected_fg",
bg_color_key_override="name_display_selected_bg")
self.update_counter()
self.mark_absent_button.config(state=tk.NORMAL)
self.export_button.config(state=tk.NORMAL if self.absent_students else tk.DISABLED)
@@ -582,11 +642,11 @@ class RollCallApp:
pinyin_text = self.current_student_info[2]
suffix_text = " [未到]"
self._set_name_display_text((base_text, pinyin_text, suffix_text),
fg_color=self.COLOR_NAME_DISPLAY_ABSENT_FG,
bg_color=self.COLOR_NAME_DISPLAY_ABSENT_BG)
fg_color_key_override="name_display_absent_fg",
bg_color_key_override="name_display_absent_bg")
self.mark_absent_button.config(state=tk.DISABLED)
self.export_button.config(state=tk.NORMAL)
self.mark_absent_button.config(state=tk.DISABLED)
self.export_button.config(state=tk.NORMAL)
def export_absent_list(self):
if not self.absent_students:
@@ -606,7 +666,7 @@ class RollCallApp:
return
try:
sorted_absent = sorted(self.absent_students, key=lambda x: x[0])
sorted_absent = sorted(self.absent_students, key=lambda x: x[0])
with open(filepath, 'w', encoding='utf-8-sig', newline='') as f:
writer = csv.writer(f)
writer.writerow(["学号", "姓名"])
@@ -622,7 +682,7 @@ class RollCallApp:
return
if messagebox.askyesno("确认", "确定要清空当前考勤数据吗?\n这将重置点名状态,但学生名单会保留。"):
self._reset_data_core()
self._reset_data_core()
self.remaining_students = self.all_students[:]
random.shuffle(self.remaining_students)
@@ -631,15 +691,15 @@ class RollCallApp:
can_enable_controls = bool(self.all_students)
self.start_button.config(state=tk.NORMAL if can_enable_controls else tk.DISABLED)
self.mark_absent_button.config(state=tk.DISABLED)
self.export_button.config(state=tk.DISABLED)
self.mark_absent_button.config(state=tk.DISABLED)
self.export_button.config(state=tk.DISABLED)
self.clear_button.config(state=tk.NORMAL if can_enable_controls else tk.DISABLED)
self.duration_slider.config(state=tk.NORMAL if can_enable_controls else tk.DISABLED)
self.speed_interval_slider.config(state=tk.NORMAL if can_enable_controls else tk.DISABLED)
self.update_counter()
self.load_button.config(state=tk.NORMAL)
self.load_button.config(state=tk.NORMAL)
# --- Main program entry point ---