refactor(gui/sidebar): 重组导航为四模块 + 扁平无框蓝色高亮主题 + 中括号移除

数据层(panel_registry.py):13 个 step 从「阶段一/二/三/四」重组为四个模块

  模块一 影像预处理(step 1-3)

  模块二 特征工程与数据(step 4-7)

  模块三 模型训练与反演(step 8-10)

  模块四 制图与成果汇编(step 11-13)

step_id 顺序、tab_index、面板绑定、Tab 路由全部保持零变化

文本层(water_quality_gui.py / v2):移除 └─ 字符前缀

样式层(styles.py:get_sidebar_stylesheet):扁平无框 + 蓝色高亮主题

  - 容器 QListWidget 无框化(border: none / outline: none / 透明背景)

  - 步骤项 padding 8px 6px + margin 2px 8px + border-radius 4px

  - hover 极浅蓝灰 #F0F4F8;selected 饱和蓝 #0078D4 + 白字 #FFFFFF

  - 分类头(stage_header):!enabled 选择器锁定 → 蓝色 #0078D4 + 加粗 + 上下间距

Python 代码侧:stage_item.setForeground 硬编码 #0078D4、stage_font.setBold(True)

作为 QSS 失效兜底 + 代码意图自解释

末尾迭代:四个模块名移除 [ ] 中括号(极简风)
This commit is contained in:
DXC
2026-06-23 16:50:30 +08:00
parent 948d1d8acd
commit c5a82ec342
4 changed files with 76 additions and 36 deletions

View File

@ -578,8 +578,9 @@ class WaterQualityGUI(QMainWindow):
# 添加阶段标题项(可视化分组)
stage_item = QListWidgetItem(stage_name)
stage_font = QFont("Arial", 11, QFont.Bold)
stage_font.setBold(True)
stage_item.setFont(stage_font)
stage_item.setForeground(QColor(ModernStylesheet.COLORS.get('accent', '#0078D4')))
stage_item.setForeground(QColor("#0078D4"))
stage_item.setFlags(stage_item.flags() & ~Qt.ItemIsSelectable)
stage_item.setFlags(stage_item.flags() & ~Qt.ItemIsEnabled)
stage_item.setData(Qt.UserRole, "stage_header")
@ -587,7 +588,7 @@ class WaterQualityGUI(QMainWindow):
# 添加该阶段的所有步骤
for step_id, step_display in steps:
item = QListWidgetItem(f" └─ {step_display}")
item = QListWidgetItem(f" {step_display}")
item.setData(Qt.UserRole, step_id)
self.step_name_map[step_display] = step_id