Files
JoeAllen ac5b6e9862 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。
2026-10-12 17:07:40 +08:00

304 lines
8.7 KiB
JSON

{
"$schema": "https://github.com/longbridge/gpui-kit/raw/refs/heads/main/.theme-schema.json",
"name": "Hybrid",
"author": "Andrew Wong",
"url": "https://github.com/w0ng/vim-hybrid",
"themes": [
{
"name": "Hybrid Light",
"mode": "light",
"shadow": false,
"colors": {
"accent.background": "#c8ced1",
"accent.foreground": "#1c1c1c",
"background": "#E4E4E4",
"border": "#CACACA",
"danger.background": "#ff5f5f",
"danger.foreground": "#ffffff",
"foreground": "#1c1c1c",
"input.border": "#CACACA",
"link.active.foreground": "#005f87",
"link.foreground": "#005f87",
"link.hover.foreground": "#005f87",
"list.active.background": "#79792C20",
"list.active.border": "#79792C",
"list.hover.background": "#D5D5D5",
"list.even.background": "#DFDFDF",
"muted.background": "#d7d7d7",
"muted.foreground": "#5f5f5f",
"primary.background": "#005f87",
"primary.foreground": "#ffffff",
"scrollbar.background": "#E0E0E000",
"scrollbar.thumb.background": "#8f8f8f",
"secondary.background": "#D0D0D0",
"secondary.active.background": "#c4c4c4",
"secondary.foreground": "#1c1c1c",
"secondary.hover.background": "#c4c4c499",
"tab.active.background": "#E4E4E4",
"tab.active.foreground": "#1c1c1c",
"tab.background": "#e8e8e800",
"tab.foreground": "#5f5f5f",
"tab_bar.background": "#e8e8e8",
"title_bar.background": "#D0D0D0",
"title_bar.border": "#B3B3B3",
"status_bar.background": "#DADADA",
"base.red": "#5F0000",
"base.green": "#005F00",
"base.yellow": "#948000",
"base.blue": "#00195f",
"base.magenta": "#5f1c51",
"base.magenta.light": "#5f1c5111",
"base.cyan": "#005a5f"
},
"highlight": {
"editor.foreground": "#1c1c1c",
"editor.background": "#E4E4E4",
"editor.active_line.background": "#D3D3D3",
"editor.line_number": "#5F5F5F",
"editor.active_line_number": "#1C1C1C",
"editor.invisible": "#5F5F5F66",
"conflict": "#D2602D",
"created": "#3F72E2",
"deleted": "#FF5F5F",
"error": "#FF5F5F",
"hidden": "#9E9E9E",
"hint": "#5F87AF",
"ignored": "#B3B3B3",
"info": "#005F87",
"modified": "#B0A878",
"predictive": "#5D5945",
"renamed": "#5F87AF",
"success": "#005F00",
"unreachable": "#9E9E9E",
"warning": "#948000",
"syntax": {
"attribute": {
"color": "#948000"
},
"boolean": {
"color": "#005F00"
},
"comment": {
"color": "#5F5F5F",
"font_style": "italic"
},
"comment.doc": {
"color": "#5F5F5F",
"font_style": "italic"
},
"constant": {
"color": "#005F87"
},
"constructor": {
"color": "#79792C"
},
"embedded": {
"color": "#1C1C1C"
},
"function": {
"color": "#005F87"
},
"keyword": {
"color": "#5F1C51"
},
"link_text": {
"color": "#005F87",
"font_style": "underline"
},
"link_uri": {
"color": "#005F87",
"font_style": "italic"
},
"number": {
"color": "#005F00"
},
"string": {
"color": "#005F00"
},
"string.escape": {
"color": "#005F00"
},
"string.regex": {
"color": "#005F00"
},
"string.special": {
"color": "#005F87"
},
"string.special.symbol": {
"color": "#005F87"
},
"tag": {
"color": "#79792C"
},
"text.literal": {
"color": "#005F87"
},
"title": {
"color": "#005F87",
"font_weight": 600
},
"type": {
"color": "#5F1C51"
},
"property": {
"color": "#1C1C1C"
},
"variable.special": {
"color": "#5F1C51"
}
}
}
},
{
"name": "Hybrid Dark",
"mode": "dark",
"colors": {
"accent.background": "#31393a",
"accent.foreground": "#e8e8e8",
"background": "#1D1F21",
"border": "#34373c",
"foreground": "#e8e8e8",
"input.border": "#34373c",
"link.active.foreground": "#87d7ff",
"link.foreground": "#81A2BE",
"link.hover.foreground": "#006f9f",
"list.active.background": "#15678a10",
"list.active.border": "#15678a",
"list.even.background": "#282A2E",
"muted.background": "#282A2E99",
"muted.foreground": "#878787",
"panel.background": "#1D1F21",
"popover.background": "#1D1F21",
"popover.foreground": "#e8e8e8",
"primary.background": "#15678a",
"primary.foreground": "#e8e8e8",
"scrollbar.background": "#1D1F2100",
"scrollbar.thumb.background": "#5f5f5f",
"secondary.background": "#303336",
"secondary.active.background": "#33363b",
"secondary.foreground": "#e8e8e8",
"secondary.hover.background": "#373b3e",
"tab.active.background": "#1D1F21",
"tab.active.foreground": "#d4d4d4",
"tab.background": "#24262700",
"tab.foreground": "#999999",
"tab_bar.background": "#242627",
"title_bar.background": "#242629",
"title_bar.border": "#34373c",
"base.red": "#8a1515",
"base.red.light": "#ff5f5f",
"base.green": "#7c8a15",
"base.green.light": "#b3bf5a",
"base.yellow": "#8a7c15",
"base.yellow.light": "#e4b55e",
"base.blue": "#15678a",
"base.blue.light": "#6e90b0",
"base.magenta": "#8a1567",
"base.magenta.light": "#B294BB",
"base.cyan": "#15678a",
"base.cyan.light": "#7fbfb4"
},
"highlight": {
"editor.foreground": "#DDDDDD",
"editor.background": "#000000",
"editor.active_line.background": "#131313",
"editor.line_number": "#8F8F8F",
"editor.active_line_number": "#DDDDDD",
"editor.invisible": "#5F5F5F66",
"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"
}
}
}
}
]
}