修改SDR色准深色异常、修改保存结果深色模式异常

This commit is contained in:
xinzhu.yin
2026-06-09 11:02:55 +08:00
parent 9ad9cf9aa0
commit 8916f2fff0
6 changed files with 206 additions and 83 deletions

View File

@@ -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()