feat(desktop): 主题化配置(GUI 深浅主题 + 编辑器主题 / 字体)#124
Merged
Conversation
为主题切换打基础,将散落的颜色配置归纳为标准色 + 视觉变体的三层结构: - _palette.scss:原始标准色(按色相 family 组织),唯一色值真相源 - _theme.scss:语义 → 标准色映射,发射为 :root CSS 自定义属性,运行期可整体换主题 - _tokens.scss:把语义 SCSS 变量桥接到对应 var(--token),各样式文件使用处零改动 使用处的 rgba($base, a) 半透明叠加改走 rgb(var(--rgb-base) / a) 通道变量。 暗色主题严格保持像素级一致(编译产物核对:语义值、通道三元组、:root 块均与重构前等价)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
新增主题偏好(跟随系统 / 浅色 / 深色),设置页常规分区即时切换、写盘持久化: - 复用三层 token 体系新增浅色配色([data-theme=light] 覆盖语义变量,VS Code Light+ 取色) - 偏好经 config.appearance.theme 驱动,渲染层解析为 data-theme,'跟随系统' 随 OS 实时切换 - localStorage 缓存首帧主题,避免浅色用户启动闪深色 - Monaco 编辑器与 Mermaid 图随主题在浅 / 深间同步,保持界面整体一致 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
设置页常规分区新增「编辑器」配置,两项均即时生效、写盘持久化: - 编辑器配色主题:可选跟随应用(默认)或 Monaco 内置主题(浅 / 深 / 高对比深 / 高对比浅) - 编辑器等宽字体:自定义字体族,同步覆盖编辑器内容与全应用等宽文本(diff / 评论 / 代码块) 渲染层经共享 store 把编辑器外观下发到 Monaco 组件,免逐层透传;字体经 CSS 变量驱动 $font-mono。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- 编辑器配色主题增至 17 种:除内置(浅 / 深 / 高对比)外,内置 GitHub、Monokai、Dracula、Nord、Night Owl、Solarized 等常用主题(取色自 monaco-themes、就地内置) - 主题以专名展示、不做国际化翻译(与语言项 endonym 同理) - 新增编辑器字号配置(限合理范围 8~32px、默认 14),编辑器与行内代码片段一并生效 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- 编辑器 / 缓存目录 / Agent 目录配置上方加分割线,与其他配置项分组 - 配置项上下间距加大;左侧分类导航字号 / 图标放大、图标与文案间距放宽;设置面板尺寸收窄 - 编辑器字体输入单独成行铺满(自由输入、可逗号分隔多字体,作 font-family 前缀拼到内置栈前) - 编辑器主题「跟随应用」项去括号注释并做本地化;其余主题名仍按专名不翻译 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- 新增 Dark 2026 / Light 2026 编辑器主题(转换自 VS Code 内置默认主题,已解析 include 链并转为 Monaco 形状) - Monaco 内置 vs / vs-dark 复用为 Light Modern / Dark Modern,不另引 VS Code Modern - 左侧分类导航字号还原(放大后与图标不协调) - 更新 CHANGELOG:主题与外观要点对齐最终形态(主题目录 + 字体 / 字号) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联里程碑 #8(主题化配置)。
概述
围绕「主题化配置」里程碑,分阶段落地 GUI 深浅主题切换与编辑器外观自定义,并先期把散落的前端配色归纳为可主题化的三层 token 体系。行为对暗色主题保持像素级一致,新增能力均即时生效、写盘持久化。
主要变更
说明
lib/editor-themes/NOTICE.md。Monaco 用 Monarch 着色(非 TextMate),细粒度 scope 保真度低于 VS Code,编辑器底色 / 前景 / 常见 token 一致。🤖 Generated with Claude Code