Skip to content

fix: update brightness DCI icon to match taskbar SVG - #522

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
mhduiy:agent/pms-bug-bot/c7d3f0d4ca21
Sep 23, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
mhduiy:agent/pms-bug-bot/c7d3f0d4ca21

Conversation

@mhduiy

@mhduiy mhduiy commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

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 uses display-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.dci with a 72x72 RGBA WebP rendered from display-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

  • Risk Level: Low
  • Only a binary resource file was modified; no code (.cpp/.h/CMakeLists.txt) changes
  • The DCI file was originally introduced in commit 19dd1aa8 (BUG-286741) to switch to DCI format; this change preserves the DCI format, only updating the image content

Business 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)保持不变。

改动安全评估

代码安全评估

  • 风险等级: 低风险
  • 仅修改二进制资源文件,无代码(.cpp/.h/CMakeLists.txt)改动
  • DCI 文件最初由 commit 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:

  • Update the wireless casting plugin icon installation to use its DCI resource instead of the removed SVG asset.

Build:

  • Adjust plugin installation to package the DCI icon resource.

Chores:

  • Update licensing metadata for the replaced icon resource.

@sourcery-ai

sourcery-ai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The 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 installation

flowchart 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]
Loading

File-Level Changes

Change Details Files
Replaces the wireless casting plugin’s installed SVG icon with a DCI resource.
  • Updates the CMake install target to deploy the DCI icon.
  • Removes the previous SVG resource.
plugins/dde-network-display-ui/plugins/CMakeLists.txt
plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/wireless-casting.svg
Updates repository packaging and licensing metadata associated with the resource change.
  • Adjusts the REUSE metadata entry.
  • Updates the Debian install manifest.
.reuse/dep5
debian/dde-wirelesscasting-plugin.install

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread plugins/dde-network-display-ui/plugins/CMakeLists.txt Outdated
Comment thread plugins/dde-network-display-ui/plugins/CMakeLists.txt Outdated
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
@mhduiy
mhduiy force-pushed the agent/pms-bug-bot/c7d3f0d4ca21 branch from a6ece36 to c23e6e1 Compare September 22, 2026 14:15
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 100 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 总体评分 100 分,大于 70 分通过阈值。本次提交仅修改二进制 DCI 图标资源文件(dcc-dde-brightness.dci),无代码改动,不存在语法逻辑、代码质量、代码性能或代码安全问题。

🔍 详细分析

1. 语法逻辑 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 无需改进,继续保持


2. 代码质量 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 无需改进,继续保持


3. 代码性能 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 无需改进,继续保持


4. 代码安全 🔒

评价: 优秀 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: 无需改进,继续保持


💡 改进建议代码示例

// 本次提交仅修改二进制 DCI 图标资源文件(dcc-dde-brightness.dci),
// 将内部 WebP 图片从空心太阳替换为与任务栏一致的半填充太阳图标。
// 无代码改动,无需修复代码示例。

本报告由 AI 代码审查工具自动生成

@deepin-ci-robot

Copy link
Copy Markdown

[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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mhduiy

mhduiy commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

This pr force merged! (status: behind)

@deepin-bot
deepin-bot Bot merged commit d686063 into linuxdeepin:master Sep 23, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants