feat(settings): prevent spinbox wheel changes

This commit is contained in:
chengma
2026-07-21 09:40:53 +08:00
parent 9c0007ca4c
commit b324e5d332
4 changed files with 136 additions and 17 deletions
+5 -2
View File
@@ -3,7 +3,7 @@ id: T-683
title: 禁用设置页数字微调框滚轮改值
phase: 5
deps: [T-682]
status: TODO
status: DONE
created: 2026-07-21
---
@@ -54,4 +54,7 @@ git diff --check
## 执行记录
- 待实现。
- 新增设置页专用 `SettingsSpinBox`,其滚轮事件不调用数值步进,而是按原始位置、增量和修饰键转发给最近的 `QScrollArea` 视口;设置页保留 `settings_scroll_area` 引用供明确的交互回归。
- 设置页全部 11 个数字微调框均替换为该组件:两类连接超时、标题/图片并发、重试、三个端口、Chrome 就绪超时、每批最大更新条数和同时更新蝦皮账号。箭头、键盘与直接输入未修改。
- 更新设置页交互说明和 GUI 回归:确认全部数字框都是专用组件,滚轮后数值及 dirty 状态不变、外层页面继续滚动,键盘上箭头仍会改值并进入未保存状态。
- 验证通过:`py -3.10 -m unittest tests.test_gui`(213 项)、`py -3.10 -m unittest discover -s tests`(654 项)、`py -3.10 -m ruff check app tests main.py`、`py -3.10 -m compileall app main.py`、`git diff --check`。