Repository navigation
fix(desktop): 托盘图标改为单色图,适配菜单栏深浅与尺寸 - #351
Merged
Merged
Conversation
- macOS 菜单栏改用 trayTemplate.png/@2x(纯黑+alpha template 图), 系统自动适配深浅外观,替代原先突兀的全彩方块图标 - Windows/Linux 无 template 机制,新增 tray-black/tray-white 两份单色图, 通过 nativeTheme.updated 跟随系统深浅主题切换 - 原 tray-16/32.png 彩色图保留为兜底;build-desktop.js 校验清单同步更新
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthrough托盘图标验证范围已扩展。Electron 主进程支持 macOS 模板图,并在其他平台根据系统主题切换托盘图标。 Changes托盘图标主题适配
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant nativeTheme
participant resolveTrayIcon
participant tray
nativeTheme->>resolveTrayIcon: 提供系统主题状态
resolveTrayIcon->>tray: 选择并设置托盘图标
nativeTheme->>tray: 主题更新后触发 setImage
Merge Risk: ⚪ Minimal · up to No concrete merge-blocking risk remains from the supplied review context. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
背景
#345 新增了托盘图标,但用的是全彩 App 图标:在 macOS 菜单栏里是一块深色圆角方块,颜色突兀、尺寸偏大。
改动
trayTemplate.png+@2x,纯黑+alpha),系统自动适配菜单栏深浅外观,不再需要维护两种颜色tray-black/tray-white两份单色图(16/32px),通过nativeTheme.updated跟随系统深浅主题切换tray-16/32.png彩色图保留为加载兜底scripts/build-desktop.js托盘图标存在性校验同步更新验证
node --check、npm run test:electron:mcp通过Summary by CodeRabbit
改进
构建