屏模组添加colorinfo设置、修改配置项UI样式
This commit is contained in:
@@ -183,8 +183,8 @@ class PQAutomationApp(
|
||||
# 创建右上角悬浮配置框
|
||||
self.create_floating_config_panel()
|
||||
|
||||
# 创建右侧结果显示区域
|
||||
self.result_frame = ttk.LabelFrame(self.control_frame_middle, text="测试结果")
|
||||
# 创建右侧结果显示区域(无边框,纯 Frame,让图表占满)
|
||||
self.result_frame = ttk.Frame(self.control_frame_middle)
|
||||
self.result_frame.pack(
|
||||
side=tk.BOTTOM, fill=tk.BOTH, expand=True, padx=0, pady=5
|
||||
)
|
||||
@@ -214,12 +214,24 @@ class PQAutomationApp(
|
||||
# 在所有控件创建完成后,统一初始化测试类型
|
||||
self.root.after(100, self.initialize_default_test_type)
|
||||
|
||||
# 状态栏
|
||||
self.status_var = tk.StringVar(value="就绪")
|
||||
# 状态栏(现代化扁平条,跟随 ttkbootstrap 主题)
|
||||
self.status_var = tk.StringVar(value="\u25cf 就绪")
|
||||
status_container = ttk.Frame(root, style="StatusBar.TFrame")
|
||||
status_container.pack(side=tk.BOTTOM, fill=tk.X)
|
||||
self.status_bar = ttk.Label(
|
||||
root, textvariable=self.status_var, relief=tk.SUNKEN, anchor=tk.W
|
||||
status_container,
|
||||
textvariable=self.status_var,
|
||||
style="StatusBar.TLabel",
|
||||
anchor=tk.W,
|
||||
)
|
||||
self.status_bar.pack(side=tk.BOTTOM, fill=tk.X)
|
||||
self.status_bar.pack(side=tk.LEFT, fill=tk.X, expand=True)
|
||||
# 右侧版本号
|
||||
ttk.Label(
|
||||
status_container,
|
||||
text=f"v{APP_VERSION}",
|
||||
style="StatusBarAccent.TLabel",
|
||||
anchor=tk.E,
|
||||
).pack(side=tk.RIGHT)
|
||||
|
||||
def _dispatch_ui(self, fn, *args, **kwargs):
|
||||
"""把 ``fn(*args, **kwargs)`` 调度到 Tk 主线程执行。
|
||||
@@ -752,8 +764,14 @@ class PQAutomationApp(
|
||||
|
||||
# 保存当前选中的测试项到配置
|
||||
self.config.set_current_test_items(self.get_selected_test_items())
|
||||
# 待修改为三种测试类型的timing值
|
||||
self.config.set_current_timing(self.screen_module_timing_var.get())
|
||||
# 按当前测试类型保存对应 timing,避免误覆盖其它测试类型配置。
|
||||
if self.config.current_test_type == "screen_module":
|
||||
self.config.set_current_timing(self.screen_module_timing_var.get())
|
||||
elif (
|
||||
self.config.current_test_type == "sdr_movie"
|
||||
and hasattr(self, "sdr_timing_var")
|
||||
):
|
||||
self.config.set_current_timing(self.sdr_timing_var.get())
|
||||
# 自动保存配置到文件
|
||||
self.save_pq_config()
|
||||
|
||||
@@ -772,6 +790,13 @@ class PQAutomationApp(
|
||||
# 控制参数框的显示
|
||||
self.toggle_cct_params_frame()
|
||||
|
||||
# 同步刷新顶部 header 折叠预览(现代化布局新增)
|
||||
if hasattr(self, "refresh_config_preview"):
|
||||
try:
|
||||
self.refresh_config_preview()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def on_closing(self):
|
||||
"""窗口关闭时的处理"""
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user