Files
cmautobuy/docs/task/147-client启动时默认最大化主窗口.md
T
2026-08-11 11:39:01 +08:00

44 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# #147 Client 启动时默认最大化主窗口
- 工单号:#147
- 标题:Client 启动时默认最大化主窗口
- 类型:功能
- 父级:#1
- 版本:MVP #2
- 状态:待验收
- 日期:2026-08-11
- Gitea:<http://ilaer.eicp.net:8418/chengma/cmautobuy/issues/147>
## 背景与目标
Client 启动后直接最大化主窗口,减少采购人员每次手动点击最大化按钮。
## 最终方案
应用启动入口使用 `showMaximized()` 首次显示主窗口。窗口仍使用标准 Windows 框架,不进入全屏;用户可以正常最小化、还原、调整大小、再次最大化和关闭。
## 改了哪些
- `client/src/ui_main.py`:首次显示主窗口时使用最大化状态。
- `client/test/test_pdd_ui_event.py`:验证启动入口调用最大化显示。
- `docs/client/05-ui-specification.md`:记录窗口启动规则。
## 验收结果
| 验收标准 | 结果 |
|---|---|
| 正常启动时主窗口最大化 | 通过 |
| 不使用全屏,保留标准窗口操作 | 通过 |
| 构造窗口时不强制显示,离屏测试可用 | 通过 |
| 不影响任务、设备、Admin 和自动化 | 通过 |
## 测试
- 执行的命令:`python -m py_compile src/ui_main.py`;PDD UI 事件测试;Client 全量 unittest。
- 结果:相关测试 50 项通过;Client 全量 380 项通过。
- **没验证到的部分**:未在真实 Windows 桌面人工检查启动最大化、还原和多显示器行为。
## 相关提交
- `e397494` Client 启动时默认最大化