修改部分UI、修改module中心点设定、添加单独连接
This commit is contained in:
@@ -74,6 +74,10 @@ def create_cct_params_frame(self: "PQAutomationApp"):
|
||||
entry = ttk.Entry(self.cct_params_frame, textvariable=var, width=15)
|
||||
entry.grid(row=i, column=1, sticky=tk.W, padx=5, pady=3)
|
||||
|
||||
# 屏模组中心由实测 100% 点自动决定,避免手动误改。
|
||||
if key in ("x_ideal", "y_ideal"):
|
||||
entry.configure(state="readonly")
|
||||
|
||||
# 绑定失去焦点事件
|
||||
default_val = screen_default_cct_params[key]
|
||||
entry.bind(
|
||||
|
||||
@@ -274,7 +274,7 @@ def create_gamma_pattern_panel(self: "PQAutomationApp"):
|
||||
right = ttk.Frame(mid)
|
||||
right.grid(row=0, column=1, sticky=tk.NS)
|
||||
|
||||
edit_frame = ttk.LabelFrame(right, text="编辑选中点", padding=8)
|
||||
edit_frame = ttk.LabelFrame(right, text="编辑选中点灯", padding=8)
|
||||
edit_frame.pack(fill=tk.X)
|
||||
|
||||
self._gamma_edit_r_var = tk.StringVar()
|
||||
@@ -358,27 +358,22 @@ def create_gamma_pattern_panel(self: "PQAutomationApp"):
|
||||
command=lambda: _paste_from_clipboard(self),
|
||||
).pack(fill=tk.X, pady=(6, 0))
|
||||
|
||||
# ===== 底部 =====
|
||||
bottom = ttk.LabelFrame(root, text="校验与保存", padding=8)
|
||||
bottom.pack(fill=tk.X, pady=(10, 0))
|
||||
# ---- 右侧:校验与保存(与编辑区放在一起) ----
|
||||
save_box = ttk.LabelFrame(right, text="校验与保存", padding=8)
|
||||
save_box.pack(fill=tk.X, pady=(10, 0))
|
||||
|
||||
self._gamma_validate_label = ttk.Label(
|
||||
bottom, text="", style="Muted.TLabel", justify=tk.LEFT
|
||||
save_box, text="", style="Muted.TLabel", justify=tk.LEFT
|
||||
)
|
||||
self._gamma_validate_label.pack(anchor=tk.W)
|
||||
|
||||
save_row = ttk.Frame(bottom)
|
||||
save_row = ttk.Frame(save_box)
|
||||
save_row.pack(fill=tk.X, pady=(6, 0))
|
||||
ttk.Button(
|
||||
save_row, text="保存改动到当前预设",
|
||||
bootstyle="primary",
|
||||
command=lambda: _save_to_current_preset(self),
|
||||
).pack(side=tk.LEFT)
|
||||
ttk.Button(
|
||||
save_row, text="应用到运行时 (gray.json)",
|
||||
bootstyle="success",
|
||||
command=lambda: _apply_current_to_runtime(self),
|
||||
).pack(side=tk.LEFT, padx=(6, 0))
|
||||
ttk.Button(
|
||||
save_row, text="另存为新预设...",
|
||||
bootstyle="info-outline",
|
||||
|
||||
@@ -607,13 +607,14 @@ def create_connection_content(self: "PQAutomationApp"):
|
||||
button_frame.grid_columnconfigure(0, weight=1)
|
||||
button_frame.grid_columnconfigure(1, weight=1)
|
||||
button_frame.grid_columnconfigure(2, weight=1)
|
||||
button_frame.grid_columnconfigure(3, weight=1)
|
||||
|
||||
# connect_icon = load_icon("assets/connect-svgrepo-com.png")
|
||||
self.check_button = ttk.Button(
|
||||
button_frame,
|
||||
# image=connect_icon,
|
||||
# bootstyle="link",
|
||||
text="连接",
|
||||
text="全部连接",
|
||||
bootstyle="success",
|
||||
takefocus=False,
|
||||
command=self.check_com_connections,
|
||||
@@ -621,6 +622,42 @@ def create_connection_content(self: "PQAutomationApp"):
|
||||
# self.check_button.image = connect_icon
|
||||
self.check_button.grid(row=0, column=0, padx=(0, 4), pady=3, sticky="ew")
|
||||
|
||||
self.ucd_connect_button = ttk.Button(
|
||||
button_frame,
|
||||
text="连接UCD",
|
||||
bootstyle="success-outline",
|
||||
takefocus=False,
|
||||
command=self.check_ucd_connection,
|
||||
)
|
||||
self.ucd_connect_button.grid(row=0, column=1, padx=4, pady=3, sticky="ew")
|
||||
|
||||
self.ca_connect_button = ttk.Button(
|
||||
button_frame,
|
||||
text="连接CA410",
|
||||
bootstyle="success-outline",
|
||||
takefocus=False,
|
||||
command=self.check_ca_connection,
|
||||
)
|
||||
self.ca_connect_button.grid(row=0, column=2, padx=4, pady=3, sticky="ew")
|
||||
|
||||
self.ucd_disconnect_button = ttk.Button(
|
||||
button_frame,
|
||||
text="断开UCD",
|
||||
bootstyle="danger-outline",
|
||||
takefocus=False,
|
||||
command=self.disconnect_ucd_connection,
|
||||
)
|
||||
self.ucd_disconnect_button.grid(row=1, column=1, padx=4, pady=3, sticky="ew")
|
||||
|
||||
self.ca_disconnect_button = ttk.Button(
|
||||
button_frame,
|
||||
text="断开CA410",
|
||||
bootstyle="danger-outline",
|
||||
takefocus=False,
|
||||
command=self.disconnect_ca_connection,
|
||||
)
|
||||
self.ca_disconnect_button.grid(row=1, column=2, padx=4, pady=3, sticky="ew")
|
||||
|
||||
# disconnect_icon = load_icon("assets/disconnect-svgrepo-com.png")
|
||||
# 断开连接按钮
|
||||
self.disconnect_button = ttk.Button(
|
||||
@@ -633,7 +670,7 @@ def create_connection_content(self: "PQAutomationApp"):
|
||||
command=self.disconnect_com_connections,
|
||||
)
|
||||
# self.disconnect_button.image = disconnect_icon # 防止图标被垃圾回收
|
||||
self.disconnect_button.grid(row=0, column=1, padx=4, pady=3, sticky="ew")
|
||||
self.disconnect_button.grid(row=1, column=0, padx=(0, 4), pady=3, sticky="ew")
|
||||
|
||||
# refresh_icon = load_icon("assets/refresh-svgrepo-com.png")
|
||||
self.refresh_button = ttk.Button(
|
||||
@@ -646,7 +683,7 @@ def create_connection_content(self: "PQAutomationApp"):
|
||||
command=self.refresh_com_ports,
|
||||
)
|
||||
# self.refresh_button.image = refresh_icon # 防止图标被垃圾回收
|
||||
self.refresh_button.grid(row=0, column=2, padx=(4, 0), pady=3, sticky="ew")
|
||||
self.refresh_button.grid(row=1, column=3, padx=(4, 0), pady=3, sticky="ew")
|
||||
|
||||
# CA端口
|
||||
ttk.Label(com_frame, text="CA端口:").grid(
|
||||
@@ -740,7 +777,7 @@ def create_test_type_frame(self: "PQAutomationApp"):
|
||||
("log_btn", "测试日志", self.toggle_log_panel),
|
||||
("ai_image_btn", "AI 图片", self.toggle_ai_image_panel),
|
||||
("pantone_baseline_btn", "Pantone 摸底", self.toggle_pantone_baseline_panel),
|
||||
("gamma_pattern_btn", "Gamma 图案", self.toggle_gamma_pattern_panel),
|
||||
("gamma_pattern_btn", "Gamma Pattern编辑", self.toggle_gamma_pattern_panel),
|
||||
("calman_btn", "CALMAN 灰阶", self.toggle_calman_panel),
|
||||
]
|
||||
for attr, text, cmd in panel_buttons:
|
||||
|
||||
@@ -29,7 +29,7 @@ _LEGACY_LIGHT_THEMES = {"yeti"}
|
||||
|
||||
_CALMAN_LIGHT_COLORS = {
|
||||
"primary": "#1755a6",
|
||||
"secondary": "#2B6CB0",
|
||||
"secondary": "#3572B4",
|
||||
"success": "#2F9E44",
|
||||
"info": "#247BA0",
|
||||
"warning": "#C98700",
|
||||
|
||||
Reference in New Issue
Block a user