修改SDR色准深色异常、修改保存结果深色模式异常
This commit is contained in:
@@ -841,6 +841,15 @@ def _refresh_theme_toggle_label(self: "PQAutomationApp") -> None:
|
||||
|
||||
def _on_toggle_theme(self: "PQAutomationApp") -> None:
|
||||
"""切换主题:重新应用 ttk 样式并刷新所有自定义样式相关的标签。"""
|
||||
# 在测试进行时禁止切换主题,避免影响测量稳定性
|
||||
if getattr(self, "testing", False):
|
||||
try:
|
||||
if hasattr(self, "log_gui"):
|
||||
self.log_gui.log("警告: 测试进行中,禁止切换主题", level="error")
|
||||
except Exception:
|
||||
pass
|
||||
return
|
||||
|
||||
from app.views.theme_manager import toggle_theme
|
||||
toggle_theme()
|
||||
# apply_modern_styles()
|
||||
|
||||
Reference in New Issue
Block a user