继续优化UI加载速度

This commit is contained in:
xinzhu.yin
2026-06-22 10:52:51 +08:00
parent 92cba114a9
commit 2d8d4119e3
7 changed files with 307 additions and 72 deletions

View File

@@ -245,10 +245,20 @@ def _show_main_content(self: "PQAutomationApp") -> None:
def _notify_panel_shown(self: "PQAutomationApp", panel_name: str) -> None:
"""面板显示后的轻量刷新(延迟执行,不阻塞切换)。"""
if getattr(self, "_theme_transition", False):
return
if panel_name == "calman":
refresh = getattr(self, "_on_calman_panel_shown", None)
if refresh is not None:
self.root.after_idle(refresh)
return
if panel_name == "ai_image" and getattr(self, "_ai_image_theme_dirty", False):
self.root.after_idle(lambda: self.refresh_ai_image_theme())
return
if panel_name == "log" and hasattr(self, "log_gui") and hasattr(
self.log_gui, "refresh_log_theme"
):
self.root.after_idle(self.log_gui.refresh_log_theme)
def _show_stack_panel(self: "PQAutomationApp", panel_name: str) -> None: