Add XCUI style theme token system
This commit is contained in:
46
docs/plan/xcui-subplans/Subplan-03_XCUI-Style-Theme-Token.md
Normal file
46
docs/plan/xcui-subplans/Subplan-03_XCUI-Style-Theme-Token.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Subplan 03:XCUI 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 获取视觉参数
|
||||
Reference in New Issue
Block a user