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,288 @@
|
||||
{
|
||||
"$schema": "https://github.com/longbridge/gpui-kit/raw/refs/heads/main/.theme-schema.json",
|
||||
"name": "macOS Classic",
|
||||
"author": "huacnlee",
|
||||
"url": "https://github.com/huacnlee/zed-theme-macos-classic",
|
||||
"themes": [
|
||||
{
|
||||
"name": "macOS Classic Light",
|
||||
"mode": "light",
|
||||
"shadow": false,
|
||||
"colors": {
|
||||
"accent.background": "#E0E0E0",
|
||||
"accent.foreground": "#000000",
|
||||
"background": "#F9F9F9",
|
||||
"foreground": "#000000",
|
||||
"border": "#D2D2D2",
|
||||
"ring": "#0060de",
|
||||
"danger.foreground": "#FFFFFF",
|
||||
"list.active.background": "#0060de15",
|
||||
"list.active.border": "#0060de",
|
||||
"list.even.background": "#EFEFEF",
|
||||
"list.hover.background": "#E7E7E7",
|
||||
"muted.background": "#EAEAEA",
|
||||
"muted.foreground": "#707070",
|
||||
"popover.background": "#F5F5F5",
|
||||
"popover.foreground": "#000000",
|
||||
"primary.background": "#0060de",
|
||||
"primary.foreground": "#FFFFFF",
|
||||
"scrollbar.background": "#FFFFFF00",
|
||||
"scrollbar.thumb.background": "#C8C8C8",
|
||||
"secondary.active.background": "#D9D9D9",
|
||||
"secondary.background": "#E0E0E0",
|
||||
"secondary.foreground": "#000000",
|
||||
"secondary.hover.background": "#E5E5E5",
|
||||
"tab.active.foreground": "#000000",
|
||||
"tab.background": "#E9E9E9",
|
||||
"tab.foreground": "#606060",
|
||||
"tab_bar.background": "#E9E9E9",
|
||||
"title_bar.background": "#F7F7F7",
|
||||
"title_bar.border": "#DADADA",
|
||||
"status_bar.background": "#E9E9E9",
|
||||
"base.yellow": "#B59A00",
|
||||
"base.red": "#d21f07",
|
||||
"base.blue": "#0060de",
|
||||
"base.green": "#319a00",
|
||||
"base.magenta": "#9A0068",
|
||||
"base.cyan": "#007E8A"
|
||||
},
|
||||
"highlight": {
|
||||
"editor.foreground": "#000000",
|
||||
"editor.background": "#ffffff",
|
||||
"editor.active_line.background": "#F5F5F5",
|
||||
"editor.line_number": "#929292",
|
||||
"editor.active_line_number": "#000000",
|
||||
"editor.invisible": "#007fff66",
|
||||
"conflict": "#d21f07",
|
||||
"created": "#0060de",
|
||||
"hidden": "#6D6D6D",
|
||||
"hint": "#9A0068",
|
||||
"modified": "#319a00",
|
||||
"predictive": "#A4ABB6",
|
||||
"warning": "#B59A00",
|
||||
"syntax": {
|
||||
"attribute": {
|
||||
"color": "#957931"
|
||||
},
|
||||
"boolean": {
|
||||
"color": "#C5060B"
|
||||
},
|
||||
"comment": {
|
||||
"color": "#007fff"
|
||||
},
|
||||
"comment.doc": {
|
||||
"color": "#007fff"
|
||||
},
|
||||
"constant": {
|
||||
"color": "#C5060B"
|
||||
},
|
||||
"constructor": {
|
||||
"color": "#0433ff"
|
||||
},
|
||||
"embedded": {
|
||||
"color": "#333333"
|
||||
},
|
||||
"function": {
|
||||
"color": "#0000A2"
|
||||
},
|
||||
"keyword": {
|
||||
"color": "#0433ff"
|
||||
},
|
||||
"link_text": {
|
||||
"color": "#0000A2",
|
||||
"font_style": "normal"
|
||||
},
|
||||
"link_uri": {
|
||||
"color": "#6A7293",
|
||||
"font_style": "italic"
|
||||
},
|
||||
"number": {
|
||||
"color": "#0433ff"
|
||||
},
|
||||
"string": {
|
||||
"color": "#036A07"
|
||||
},
|
||||
"string.escape": {
|
||||
"color": "#036A07"
|
||||
},
|
||||
"string.regex": {
|
||||
"color": "#036A07"
|
||||
},
|
||||
"string.special": {
|
||||
"color": "#d21f07"
|
||||
},
|
||||
"string.special.symbol": {
|
||||
"color": "#d21f07"
|
||||
},
|
||||
"tag": {
|
||||
"color": "#0433ff"
|
||||
},
|
||||
"text.literal": {
|
||||
"color": "#6F42C1"
|
||||
},
|
||||
"title": {
|
||||
"color": "#0433FF"
|
||||
},
|
||||
"type": {
|
||||
"color": "#6f42c1"
|
||||
},
|
||||
"property": {
|
||||
"color": "#333333"
|
||||
},
|
||||
"variable": {
|
||||
"color": "#333333"
|
||||
},
|
||||
"variable.special": {
|
||||
"color": "#C5060B"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macOS Classic Dark",
|
||||
"mode": "dark",
|
||||
"shadow": false,
|
||||
"colors": {
|
||||
"accent.background": "#282629",
|
||||
"accent.foreground": "#CACCCA",
|
||||
"background": "#131313",
|
||||
"border": "#303030",
|
||||
"ring": "#077CFD",
|
||||
"foreground": "#DEDEDE",
|
||||
"danger.background": "#E44A4F",
|
||||
"list.even.background": "#232323",
|
||||
"list.active.background": "#0059D115",
|
||||
"list.active.border": "#077CFD",
|
||||
"muted.background": "#202020",
|
||||
"muted.foreground": "#9D9D9D",
|
||||
"popover.background": "#101010",
|
||||
"popover.foreground": "#CACCCA",
|
||||
"primary.background": "#077CFD",
|
||||
"primary.foreground": "#F2F9FF",
|
||||
"switch.background": "#393939",
|
||||
"switch.thumb.background": "#DAECFF",
|
||||
"scrollbar.background": "#13131300",
|
||||
"scrollbar.thumb.background": "#9F9F9F",
|
||||
"secondary.active.background": "#353535",
|
||||
"secondary.background": "#353535",
|
||||
"secondary.foreground": "#DEDEDE",
|
||||
"secondary.hover.background": "#35353599",
|
||||
"link": "#419CFF",
|
||||
"tab_bar.background": "#1C1C1E",
|
||||
"tab.active.background": "#131313",
|
||||
"tab.foreground": "#8F8F8F",
|
||||
"title_bar.background": "#171717",
|
||||
"selection.background": "#3F638B",
|
||||
"base.blue": "#419CFF",
|
||||
"base.cyan": "#07FDD3",
|
||||
"base.green": "#30D158",
|
||||
"base.magenta": "#A550A7",
|
||||
"base.red": "#FF5257",
|
||||
"base.yellow": "#FFC600"
|
||||
},
|
||||
"highlight": {
|
||||
"editor.foreground": "#CACCCA",
|
||||
"editor.background": "#131313",
|
||||
"editor.active_line.background": "#35343666",
|
||||
"editor.line_number": "#8F8F8F",
|
||||
"editor.active_line_number": "#DDDDDD",
|
||||
"editor.invisible": "#007fff66",
|
||||
"conflict": "#D2602D",
|
||||
"created": "#3f72e2",
|
||||
"created.background": "#0C4619",
|
||||
"deleted.background": "#46190C",
|
||||
"error.background": "#46190C",
|
||||
"error.border": "#E44A4F",
|
||||
"hidden": "#9E9E9E",
|
||||
"hint": "#b283f8",
|
||||
"hint.background": "#250c4b",
|
||||
"hint.border": "#3f0891",
|
||||
"info.background": "#0059D1",
|
||||
"info.border": "#0059D1",
|
||||
"modified": "#B0A878",
|
||||
"modified.background": "#3A310E",
|
||||
"predictive": "#5D5945",
|
||||
"success.background": "#0C4619",
|
||||
"warning.background": "#3A310E",
|
||||
"warning.border": "#7B6508",
|
||||
"syntax": {
|
||||
"attribute": {
|
||||
"color": "#7FAEF9"
|
||||
},
|
||||
"boolean": {
|
||||
"color": "#CC9E00"
|
||||
},
|
||||
"comment": {
|
||||
"color": "#9D9D9D"
|
||||
},
|
||||
"comment.doc": {
|
||||
"color": "#9D9D9D"
|
||||
},
|
||||
"constant": {
|
||||
"color": "#CC9E00"
|
||||
},
|
||||
"constructor": {
|
||||
"color": "#CBA6F7"
|
||||
},
|
||||
"embedded": {
|
||||
"color": "#CACCCA"
|
||||
},
|
||||
"function": {
|
||||
"color": "#B3C5F3"
|
||||
},
|
||||
"keyword": {
|
||||
"color": "#87B1F6"
|
||||
},
|
||||
"link_text": {
|
||||
"color": "#419CFF",
|
||||
"font_style": "normal"
|
||||
},
|
||||
"link_uri": {
|
||||
"color": "#7faef9",
|
||||
"font_style": "italic"
|
||||
},
|
||||
"number": {
|
||||
"color": "#CC9E00"
|
||||
},
|
||||
"string": {
|
||||
"color": "#A3E09F"
|
||||
},
|
||||
"text.code.span": {
|
||||
"color": "#A3E09F"
|
||||
},
|
||||
"string.escape": {
|
||||
"color": "#68DC7C"
|
||||
},
|
||||
"string.regex": {
|
||||
"color": "#68DC7C"
|
||||
},
|
||||
"string.special": {
|
||||
"color": "#A3E09F"
|
||||
},
|
||||
"string.special.symbol": {
|
||||
"color": "#A3E09F"
|
||||
},
|
||||
"tag": {
|
||||
"color": "#419CFF"
|
||||
},
|
||||
"text.literal": {
|
||||
"color": "#A3E09F"
|
||||
},
|
||||
"title": {
|
||||
"color": "#CC9E00",
|
||||
"font_weight": 600
|
||||
},
|
||||
"type": {
|
||||
"color": "#CBA6F7"
|
||||
},
|
||||
"property": {
|
||||
"color": "#BCC4E0"
|
||||
},
|
||||
"variable.special": {
|
||||
"color": "#419CFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user