fix: update brightness DCI icon to match taskbar SVG - #522
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe diff shown does not match the pull request description: instead of updating the brightness DCI binary, it changes the wireless casting plugin to install a DCI icon, removes its SVG source, and updates related packaging metadata. Review should first confirm whether the intended PR contents or the supplied diff is authoritative. Flow diagram for wireless casting DCI icon installationflowchart LR
CMakeLists[CMakeLists.txt] -->|"install(FILES dcc-wireless-casting.dci)"| IconDirectory[share/dde-dock/icons/dcc-setting]
IconDirectory -->|"loads plugin icon"| WirelessCasting[Wireless casting plugin]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="plugins/dde-network-display-ui/plugins/CMakeLists.txt" line_range="77" />
<code_context>
install(FILES ${QM_FILES_DOCK} DESTINATION share/dock-wirelesscasting-plugin/translations)
# 安装显示在控制中心-个性化-任务栏-插件区域的图标
-install(FILES "dock-wirelesscasting-plugin/res/wireless-casting.svg" DESTINATION share/dde-dock/icons/dcc-setting)
+install(FILES "dock-wirelesscasting-plugin/res/dcc-wireless-casting.dci" DESTINATION share/dde-dock/icons/dcc-setting)
</code_context>
<issue_to_address>
**issue (bug_risk):** The patch changes the wireless-casting plugin icon installation, but does not modify or install `dcc-dde-brightness.dci`; therefore the brightness control-center icon remains unchanged and the described brightness fix is not implemented.
**Suggested fix:** Change the brightness plugin's DCI resource instead, or correct the patch scope and title if the intended fix is for wireless casting.
</issue_to_address>
### Comment 2
<location path="plugins/dde-network-display-ui/plugins/CMakeLists.txt" line_range="77" />
<code_context>
install(FILES ${QM_FILES_DOCK} DESTINATION share/dock-wirelesscasting-plugin/translations)
# 安装显示在控制中心-个性化-任务栏-插件区域的图标
-install(FILES "dock-wirelesscasting-plugin/res/wireless-casting.svg" DESTINATION share/dde-dock/icons/dcc-setting)
+install(FILES "dock-wirelesscasting-plugin/res/dcc-wireless-casting.dci" DESTINATION share/dde-dock/icons/dcc-setting)
</code_context>
<issue_to_address>
**issue (bug_risk):** The patch installs `dcc-wireless-casting.dci` and removes `wireless-casting.svg`, but the shown diff does not add the referenced DCI file; the wireless-casting plugin package installation therefore fails when CMake or Debian packaging tries to install the missing resource.
**Triggers:** When the patch is applied without an accompanying added `dcc-wireless-casting.dci` binary resource.
**Suggested fix:** Add `dock-wirelesscasting-plugin/res/dcc-wireless-casting.dci` to the source tree and ensure it is included in the package, or retain the SVG installation.
</issue_to_address>1. Root cause: dcc-dde-brightness.dci contains a hollow-sun WebP image, while taskbar uses display-brightness-control_16px.svg (half-filled sun), causing visual inconsistency in control center 2. Fix: render the SVG to 72x72 WebP and replace the image inside the DCI file, no code changes 3. Impact: only affects control center brightness plugin icon display, no behavior change for taskbar or other plugins Log: Update brightness icon in control center to match taskbar Influence: 1. Verify control center brightness plugin icon matches taskbar 2. Verify icon displays correctly in both light and dark themes fix: 更新亮度 DCI 图标与任务栏 SVG 一致 1. 根因:dcc-dde-brightness.dci 内部 WebP 图片为空心太阳, 而任务栏使用 display-brightness-control_16px.svg(半填充太阳), 导致控制中心显示图标不一致 2. 方案:将 SVG 渲染为 72x72 WebP 并替换 DCI 内部图片, 无代码改动 3. 影响:仅影响控制中心亮度插件图标显示,不影响任务栏 及其他插件 Log: 更新控制中心亮度图标与任务栏一致 Influence: 1. 验证控制中心亮度插件图标与任务栏一致 2. 验证深色和浅色主题下图标显示正常 PMS: BUG-296501
a6ece36 to
c23e6e1
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 无需改进,继续保持 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 无需改进,继续保持 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 无需改进,继续保持 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: 无需改进,继续保持 💡 改进建议代码示例// 本次提交仅修改二进制 DCI 图标资源文件(dcc-dde-brightness.dci),
// 将内部 WebP 图片从空心太阳替换为与任务栏一致的半填充太阳图标。
// 无代码改动,无需修复代码示例。本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy, robertkill The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: behind) |
Root Cause Analysis
The brightness icon displayed in the control center (hollow sun) does not match the brightness icon in the taskbar (half-filled sun). The root cause is that
dcc-dde-brightness.dci, installed by dde-tray-loader's brightness plugin, contains a hollow-sun WebP image, while the taskbar usesdisplay-brightness-control_16px.svg(half-filled sun). The control center loads the DCI file, causing the visual mismatch.Fix
Replaced the WebP image inside
dcc-dde-brightness.dciwith a 72x72 RGBA WebP rendered fromdisplay-brightness-control_16px.svg. No code changes — only the binary DCI resource file was modified. The DCI directory structure (normal.dark symlink → normal.light) remains unchanged.Change Safety Assessment
Code Safety
19dd1aa8(BUG-286741) to switch to DCI format; this change preserves the DCI format, only updating the image contentBusiness Impact Scope
Affects only the brightness plugin icon display in the control center's plugin area. The taskbar brightness icon (loaded from SVG) is unaffected. No other plugins or features are impacted.
Verification Suggestion
Verify the control center brightness plugin icon matches the taskbar brightness icon (both showing half-filled sun). Test in both light and dark themes.
根因分析
控制中心显示的亮度图标(空心太阳)与任务栏亮度图标(半填充太阳)不一致。根因是 dde-tray-loader 亮度插件安装的
dcc-dde-brightness.dci内部 WebP 图片为空心太阳,而任务栏使用display-brightness-control_16px.svg(半填充太阳)。控制中心加载 DCI 文件导致显示不一致。修复方案
将
dcc-dde-brightness.dci内部的 WebP 图片替换为从display-brightness-control_16px.svg渲染的 72x72 RGBA WebP 图片。无代码改动,仅修改二进制 DCI 资源文件。DCI 目录结构(normal.dark 符号链接 → normal.light)保持不变。改动安全评估
代码安全评估
19dd1aa8(BUG-286741)引入以切换至 DCI 格式,本次改动保持 DCI 格式不变,仅更新图片内容业务影响范围
仅影响控制中心插件区域中亮度插件的图标显示。任务栏亮度图标(从 SVG 加载)不受影响。其他插件或功能不受影响。
验证建议
验证控制中心亮度插件图标与任务栏亮度图标一致(均显示半填充太阳)。在浅色和深色主题下分别测试。
Summary by Sourcery
Switch the wireless casting plugin to the DCI-based icon resource for Control Center integration.
Enhancements:
Build:
Chores: