继续优化深色模式显示

This commit is contained in:
xinzhu.yin
2026-05-28 16:41:52 +08:00
parent cf724d60d7
commit c173e2338d
10 changed files with 278 additions and 96 deletions

View File

@@ -10,6 +10,18 @@ import threading
import time
def _theme_colors():
style = ttk.Style()
colors = style.colors
return {
"fg": colors.fg,
"muted": colors.secondary,
"info": colors.info,
"warning": colors.warning,
"error": colors.danger,
}
class PQDebugPanel:
"""PQ 单步调试面板 - 支持 Gamma/EOTF/色准单步测试"""
@@ -72,7 +84,7 @@ class PQDebugPanel:
self.screen_gamma_frame,
text="测试完成后可用,选择灰阶进行单步调试",
font=("SimHei", 9),
foreground="gray",
foreground=_theme_colors()["muted"],
).grid(row=0, column=0, columnspan=3, pady=(0, 10))
# 灰阶选择
@@ -137,7 +149,7 @@ class PQDebugPanel:
self.screen_rgb_frame,
text="测试完成后可用,选择颜色进行单步调试",
font=("SimHei", 9),
foreground="gray",
foreground=_theme_colors()["muted"],
).grid(row=0, column=0, columnspan=3, pady=(0, 10))
# RGB 颜色选择
@@ -210,7 +222,7 @@ class PQDebugPanel:
self.sdr_gamma_frame,
text="测试完成后可用,选择灰阶进行单步调试",
font=("SimHei", 9),
foreground="gray",
foreground=_theme_colors()["muted"],
).grid(row=0, column=0, columnspan=3, pady=(0, 10))
ttk.Label(self.sdr_gamma_frame, text="选择灰阶:").grid(
@@ -272,7 +284,7 @@ class PQDebugPanel:
self.sdr_accuracy_frame,
text="测试完成后可用,选择色块进行单步调试",
font=("SimHei", 9),
foreground="gray",
foreground=_theme_colors()["muted"],
).grid(row=0, column=0, columnspan=3, pady=(0, 10))
ttk.Label(self.sdr_accuracy_frame, text="选择色块:").grid(
@@ -334,7 +346,7 @@ class PQDebugPanel:
self.sdr_rgb_frame,
text="测试完成后可用,选择颜色进行单步调试",
font=("SimHei", 9),
foreground="gray",
foreground=_theme_colors()["muted"],
).grid(row=0, column=0, columnspan=3, pady=(0, 10))
# RGB 颜色选择
@@ -407,7 +419,7 @@ class PQDebugPanel:
self.hdr_eotf_frame,
text="测试完成后可用,选择灰阶进行单步调试",
font=("SimHei", 9),
foreground="gray",
foreground=_theme_colors()["muted"],
).grid(row=0, column=0, columnspan=3, pady=(0, 10))
ttk.Label(self.hdr_eotf_frame, text="选择灰阶:").grid(
@@ -469,7 +481,7 @@ class PQDebugPanel:
self.hdr_accuracy_frame,
text="测试完成后可用,选择色块进行单步调试",
font=("SimHei", 9),
foreground="gray",
foreground=_theme_colors()["muted"],
).grid(row=0, column=0, columnspan=3, pady=(0, 10))
ttk.Label(self.hdr_accuracy_frame, text="选择色块:").grid(
@@ -531,7 +543,7 @@ class PQDebugPanel:
self.hdr_rgb_frame,
text="测试完成后可用,选择颜色进行单步调试",
font=("SimHei", 9),
foreground="gray",
foreground=_theme_colors()["muted"],
).grid(row=0, column=0, columnspan=3, pady=(0, 10))
# RGB 颜色选择
@@ -1007,12 +1019,13 @@ class PQDebugPanel:
)
# 设置标签样式
tree.tag_configure("header", background="#E3F2FD", font=("SimHei", 9, "bold"))
tree.tag_configure("normal", foreground="black")
tree.tag_configure("warning", foreground="red")
tree.tag_configure("highlight", foreground="blue", font=("SimHei", 9, "bold"))
palette = _theme_colors()
tree.tag_configure("header", background=palette["info"], font=("SimHei", 9, "bold"))
tree.tag_configure("normal", foreground=palette["fg"])
tree.tag_configure("warning", foreground=palette["warning"])
tree.tag_configure("highlight", foreground=palette["info"], font=("SimHei", 9, "bold"))
tree.tag_configure(
"highlight_warning", foreground="red", font=("SimHei", 9, "bold")
"highlight_warning", foreground=palette["warning"], font=("SimHei", 9, "bold")
)
def _disable_test_button(self, test_type, test_item):