feat: persist template/batch-mode, per-aspect resets, de-dup template actions
§17.1 Preferences persistence: - Wire the previously-unused config_service; remember and restore the last-selected template and last batch mode. main_window loads config, distributes initial values, then persists on change (save-on-change). - template_panel: template_changed signal, select_template, current_template_state. queue_panel: set_batch_mode + batch_mode_changed. §17.2 Independent resets: - Replace the combined reset and 归零 with per-section 位置/尺寸/旋转 reset buttons (quiet ghost styling) that restore only their own aspect to the selected template. Size reset changes width/height only, leaving X/Y. Button de-dup: - Remove the export panel's 应用为模板 / 重置为模板 — literal duplicates of the template panel's 另存为 / 重置为模板. Template actions now live only in the template area; the export panel handles output only. Docs: PRD (6.6/6.9/9/10), architecture (4.12), UI design (7.x/10), development-rules (6, single-home actions + consistent naming), tasks.md (17). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -240,11 +240,15 @@ BatchResult
|
||||
- 读取和保存应用配置。
|
||||
- 管理默认配置。
|
||||
- 在配置损坏或缺失时提供安全默认值。
|
||||
- 持久化用户偏好:输出设置、上次选择的模板(`last_template`)、上次选择的批量模式(`last_batch_mode`)等。
|
||||
|
||||
由主窗口集中使用:启动时加载一次并把初值分发给各面板,面板选择变化时「改一次存一次」回写。各 UI 控件不直接读写配置文件,避免分散解析。
|
||||
|
||||
禁止:
|
||||
|
||||
- 禁止在多个模块中重复解析同一个配置文件。
|
||||
- 禁止启动时无提示清空用户配置。
|
||||
- 禁止 UI 控件绕过本服务直接读写配置文件。
|
||||
|
||||
### 4.13 `services/template_service.py`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user