feat: 接入 gpui-kit 全部 38 个官方主题预设 + 按语言拆分 locales + 0.7.3 升级
主题预设("我全都要"): - gpui-app/themes/ 内嵌官方捆绑 21 个文件 36 变体 + Default Light/Dark - theme.rs:register_bundled_themes(bootstrap 注册)/ apply_theme_preset (Theme::update + apply_config 整包应用)/ theme_preset_names - settings.theme_preset 字段(serde 默认 linear);保存/启动按预设分派, 外观模式与跟随系统监听仅对 Linear 生效(预设自带明暗不被冲掉) - 设置页「主题预设」下拉(Linear + 38 注册名),切换即时生效 语言包按语言分文件(用户要求): - locales/ui.yml → locales/en.yml + locales/zh-CN.yml (rust-i18n 文件名 stem 即 locale,扁平 "ns.key": "value") - i18n.rs 测试改为双文件键集合一致性 + 占位符强制 修复:设置对话框打开即栈溢出 - gpui-kit 0.7.0→0.7.3 无法解决;根因是 Windows 主线程 8MB 栈对 Dialog 覆盖层内 Select 渲染的深调用链不足,注册多主题后越过阈值 (64MB 试验栈下不复现,证实深调用链而非无限递归) - .cargo/config.toml:Windows 主线程栈 8MB→64MB - 注册时机移到 bootstrap(main 的 init_themes,gpui_kit::init 后、 窗口创建前),对齐官方 story 示例的注册姿势 - 误伤修复:gpui-app/Cargo.toml 被批量编辑误删 bin.name 与 build-dependencies 段;examples/flood.rs 误删已恢复 官方 skill 同步:npx skills add 被墙,gh-proxy 镜像克隆后手动覆盖 ~/.agents/skills 与 ~/.zcode/skills 的 gpui-kit + gpui-kit-design-guides。
This commit is contained in:
@@ -0,0 +1,283 @@
|
||||
{
|
||||
"$schema": "https://github.com/longbridge/gpui-kit/raw/refs/heads/main/.theme-schema.json",
|
||||
"name": "Molokai",
|
||||
"author": "Tomas Restrepo",
|
||||
"url": "https://github.com/tomasr/molokai",
|
||||
"themes": [
|
||||
{
|
||||
"name": "Molokai Light",
|
||||
"mode": "light",
|
||||
"shadow": false,
|
||||
"colors": {
|
||||
"accent.background": "#EBE4E1",
|
||||
"accent.foreground": "#060606",
|
||||
"background": "#FEFAF9",
|
||||
"border": "#E4DEDA",
|
||||
"window_border": "#d6d6d6",
|
||||
"ring": "#a0a0ab",
|
||||
"foreground": "#0a0a0a",
|
||||
"input.border": "#E4DEDA",
|
||||
"list.active.background": "#E1477411",
|
||||
"list.active.border": "#E14774AA",
|
||||
"list.even.background": "#E4DEDA33",
|
||||
"muted.background": "#f1eded",
|
||||
"muted.foreground": "#767676",
|
||||
"panel.background": "#FEFAF9",
|
||||
"popover.background": "#FEFAF9",
|
||||
"popover.foreground": "#0a0a0a",
|
||||
"primary.background": "#E14774",
|
||||
"primary.foreground": "#fafafa",
|
||||
"scrollbar.background": "#FEFAF900",
|
||||
"scrollbar.thumb.background": "#ADADB0",
|
||||
"secondary.background": "#E4DEDA",
|
||||
"secondary.foreground": "#060606",
|
||||
"secondary.hover.background": "#E4DEDA99",
|
||||
"title_bar.background": "#e8e3e0",
|
||||
"title_bar.border": "#d5ccc6",
|
||||
"base.red": "#e17047",
|
||||
"base.green": "#82cc0a",
|
||||
"base.yellow": "#ccac0a",
|
||||
"base.blue": "#e16032",
|
||||
"base.blue.light": "#e16032",
|
||||
"base.magenta": "#7058be",
|
||||
"base.cyan": "#0acc78"
|
||||
},
|
||||
"highlight": {
|
||||
"editor.foreground": "#0a0a0a",
|
||||
"editor.background": "#FEFAF9",
|
||||
"editor.active_line.background": "#E4DEDA",
|
||||
"editor.line_number": "#767676",
|
||||
"editor.active_line_number": "#0a0a0a",
|
||||
"editor.invisible": "#76767666",
|
||||
"conflict": "#e14775",
|
||||
"created": "#269D69",
|
||||
"deleted": "#e14775",
|
||||
"error": "#e14775",
|
||||
"hidden": "#767676",
|
||||
"hint": "#7058be",
|
||||
"ignored": "#767676",
|
||||
"info": "#1c8ca8",
|
||||
"modified": "#cc7a0a",
|
||||
"predictive": "#ADADB0",
|
||||
"renamed": "#E14774",
|
||||
"success": "#269D69",
|
||||
"unreachable": "#767676",
|
||||
"warning": "#cc7a0a",
|
||||
"syntax": {
|
||||
"attribute": {
|
||||
"color": "#e14775"
|
||||
},
|
||||
"boolean": {
|
||||
"color": "#cc7a0a"
|
||||
},
|
||||
"comment": {
|
||||
"color": "#767676",
|
||||
"font_style": "italic"
|
||||
},
|
||||
"comment.doc": {
|
||||
"color": "#767676",
|
||||
"font_style": "italic"
|
||||
},
|
||||
"constant": {
|
||||
"color": "#7058be"
|
||||
},
|
||||
"constructor": {
|
||||
"color": "#269D69"
|
||||
},
|
||||
"embedded": {
|
||||
"color": "#1c8ca8"
|
||||
},
|
||||
"function": {
|
||||
"color": "#e14775"
|
||||
},
|
||||
"keyword": {
|
||||
"color": "#e14775",
|
||||
"font_style": "normal"
|
||||
},
|
||||
"link_text": {
|
||||
"color": "#cc7a0a",
|
||||
"font_style": "underline"
|
||||
},
|
||||
"link_uri": {
|
||||
"color": "#7058be",
|
||||
"font_style": "italic"
|
||||
},
|
||||
"number": {
|
||||
"color": "#cc7a0a"
|
||||
},
|
||||
"string": {
|
||||
"color": "#269D69"
|
||||
},
|
||||
"string.escape": {
|
||||
"color": "#7058be"
|
||||
},
|
||||
"string.regex": {
|
||||
"color": "#269D69"
|
||||
},
|
||||
"string.special": {
|
||||
"color": "#e14775"
|
||||
},
|
||||
"string.special.symbol": {
|
||||
"color": "#e14775"
|
||||
},
|
||||
"tag": {
|
||||
"color": "#e14775"
|
||||
},
|
||||
"text.literal": {
|
||||
"color": "#7058be"
|
||||
},
|
||||
"title": {
|
||||
"color": "#cc7a0a",
|
||||
"font_weight": 600
|
||||
},
|
||||
"type": {
|
||||
"color": "#1c8ca8"
|
||||
},
|
||||
"property": {
|
||||
"color": "#7058be"
|
||||
},
|
||||
"variable.special": {
|
||||
"color": "#e14775"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Molokai Dark",
|
||||
"mode": "dark",
|
||||
"colors": {
|
||||
"accent.background": "#2b2f30",
|
||||
"accent.foreground": "#f8f8f2",
|
||||
"background": "#1b1d1e",
|
||||
"border": "#393939",
|
||||
"foreground": "#f8f8f2",
|
||||
"input.border": "#3b3b3b",
|
||||
"list.active.background": "#f9267211",
|
||||
"list.active.border": "#f9267288",
|
||||
"list.even.background": "#292c2e",
|
||||
"muted.background": "#232526",
|
||||
"muted.foreground": "#5b5a54",
|
||||
"panel.background": "#1b1d1e",
|
||||
"popover.background": "#1b1d1e",
|
||||
"popover.foreground": "#f8f8f2",
|
||||
"primary.background": "#dc1860",
|
||||
"primary.foreground": "#f8f8f2",
|
||||
"scrollbar.background": "#1b1d1e00",
|
||||
"scrollbar.thumb.background": "#4b4b4b",
|
||||
"secondary.background": "#292c2e",
|
||||
"secondary.active.background": "#303436",
|
||||
"secondary.foreground": "#f5f5f4",
|
||||
"secondary.hover.background": "#30343699",
|
||||
"table.row.border": "#3b3b3b70",
|
||||
"title_bar.background": "#202223",
|
||||
"title_bar.border": "#3b3b3b",
|
||||
"base.red": "#dc1860",
|
||||
"base.green": "#82cc0a",
|
||||
"base.yellow": "#807607",
|
||||
"base.blue": "#075880",
|
||||
"base.magenta": "#800780",
|
||||
"base.cyan": "#07807e"
|
||||
},
|
||||
"highlight": {
|
||||
"editor.foreground": "#DDDDDD",
|
||||
"editor.background": "#000000",
|
||||
"editor.active_line.background": "#131313",
|
||||
"editor.line_number": "#8F8F8F",
|
||||
"editor.active_line_number": "#DDDDDD",
|
||||
"editor.invisible": "#76767666",
|
||||
"conflict": "#D2602D",
|
||||
"created": "#3f72e2",
|
||||
"created.background": "#0C4619",
|
||||
"deleted.background": "#46190C",
|
||||
"error.background": "#46190C",
|
||||
"error.border": "#802207",
|
||||
"hidden": "#9E9E9E",
|
||||
"hint": "#b283f8",
|
||||
"hint.background": "#250c4b",
|
||||
"hint.border": "#3f0891",
|
||||
"info.background": "#0C194D",
|
||||
"info.border": "#082190",
|
||||
"modified": "#B0A878",
|
||||
"modified.background": "#3A310E",
|
||||
"predictive": "#5D5945",
|
||||
"success.background": "#0C4619",
|
||||
"warning.background": "#3A310E",
|
||||
"warning.border": "#7B6508",
|
||||
"syntax": {
|
||||
"attribute": {
|
||||
"color": "#be9a52"
|
||||
},
|
||||
"boolean": {
|
||||
"color": "#E1D797"
|
||||
},
|
||||
"comment": {
|
||||
"color": "#9E9E9E"
|
||||
},
|
||||
"comment.doc": {
|
||||
"color": "#9E9E9E"
|
||||
},
|
||||
"constant": {
|
||||
"color": "#E1D797"
|
||||
},
|
||||
"constructor": {
|
||||
"color": "#b5af9a"
|
||||
},
|
||||
"embedded": {
|
||||
"color": "#CACCCA"
|
||||
},
|
||||
"function": {
|
||||
"color": "#E1D797"
|
||||
},
|
||||
"keyword": {
|
||||
"color": "#E19773"
|
||||
},
|
||||
"link_text": {
|
||||
"color": "#A86D3B",
|
||||
"font_style": "normal"
|
||||
},
|
||||
"link_uri": {
|
||||
"color": "#6F6D66",
|
||||
"font_style": "italic"
|
||||
},
|
||||
"number": {
|
||||
"color": "#E19773"
|
||||
},
|
||||
"string": {
|
||||
"color": "#76BA53"
|
||||
},
|
||||
"string.escape": {
|
||||
"color": "#76BA53"
|
||||
},
|
||||
"string.regex": {
|
||||
"color": "#76BA53"
|
||||
},
|
||||
"string.special": {
|
||||
"color": "#E1D797"
|
||||
},
|
||||
"string.special.symbol": {
|
||||
"color": "#E1D797"
|
||||
},
|
||||
"tag": {
|
||||
"color": "#b5af9a"
|
||||
},
|
||||
"text.literal": {
|
||||
"color": "#E1D797"
|
||||
},
|
||||
"title": {
|
||||
"color": "#A76D3B",
|
||||
"font_weight": 600
|
||||
},
|
||||
"type": {
|
||||
"color": "#A86D3B"
|
||||
},
|
||||
"property": {
|
||||
"color": "#CACCCA"
|
||||
},
|
||||
"variable.special": {
|
||||
"color": "#E19773"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user