Files
XCEngine/docs/used/Subplan-03_XCUI-Style-Theme-Token.md

47 lines
1.1 KiB
Markdown
Raw Permalink 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.
# Subplan 03XCUI Style / Theme / Token
目标:
- 建立 XCUI 的样式模型、token 体系与主题覆盖规则。
- 让控件视觉不再散落在代码硬编码常量里。
负责人边界:
- 负责 `Style` / `Theme` / `Token` 数据模型和解析规则。
- 不负责 `.xcui` 导入器。
- 不负责最终 renderer 具体绘制。
建议目录:
- `engine/include/XCEngine/UI/Style/`
- `engine/src/UI/Style/`
- `tests` 中 style/theme 测试
前置依赖:
- 依赖 `Subplan 01` 的节点属性注入点。
现在就可以先做的内容:
- 设计 style 层级:默认样式、类型样式、命名样式、局部覆盖
- 设计 token颜色、圆角、边距、字号、线宽
- 设计主题切换与 token 查询接口
- 写冲突优先级测试
明确不做:
- 不做具体面板视觉重构
- 不做字体资源导入
交付物:
- 统一样式查询入口
- `.xctheme` 对应的数据结构
- 样式优先级与 token 解析测试
验收标准:
- 样式优先级可预测
- 主题替换不需要改控件逻辑
- 其他 subplan 能通过统一 API 获取视觉参数