Skip to content

feat: adjust launcher window shadow settings - #854

Merged
18202781743 merged 1 commit into
linuxdeepin:masterfrom
18202781743:master
Nov 18, 2026
Merged

18202781743 merged 1 commit into
linuxdeepin:masterfrom
18202781743:master

Conversation

@18202781743

@18202781743 18202781743 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor
  1. Add shadowRadius of 40 to the launcher window for a softer, more
    diffuse shadow
  2. Make shadowOffset compositor-aware: use Qt.point(0, 10) on TreeLand
    and Qt.point(0, 25) elsewhere
  3. Tweak dark theme shadow color to a warm dark tone Qt.rgba(0.23, 0.17,
    0.17, 0.5) instead of pure black

The previous fixed shadow offset did not render well under the TreeLand
compositor and the shadow lacked radius control, resulting in a harsh
appearance. This change enables a bigger blur radius, adapts the offset
per compositor, and warms the dark theme shadow color to better match
the Crystal color palette.

Log: Launcher window shadow is now softer and adapts to the TreeLand
compositor

Influence:

  1. Open the launcher in both TreeLand and non-TreeLand sessions and
    verify the shadow renders correctly with no clipping
  2. Verify the shadow offset differs between TreeLand (10) and other
    compositors (25)
  3. Test shadow appearance in light and dark themes
  4. Confirm the window remains resizable/movable behavior unaffected
    (system resize and move still disabled)
  5. Check blur behind the window still works together with the enlarged
    shadow radius

feat: 调整启动器窗口阴影设置

  1. 为启动器窗口添加 40 的阴影半径,使阴影更柔和、更弥散
  2. 使阴影偏移适配不同合成器:TreeLand 上使用 Qt.point(0, 10),其他环境使
    用 Qt.point(0, 25)
  3. 将深色主题阴影颜色调整为暖暗色调 Qt.rgba(0.23, 0.17, 0.17, 0.5),替代
    纯黑色

此前固定的阴影偏移在 TreeLand 合成器下渲染效果不佳,且阴影缺少半径控制,
显得生硬。此修改启用了更大的模糊半径,按合成器自适应偏移,并将深色主题阴
影调整为更贴合 Crystal 调色板的暖色调。

Log: 启动器窗口阴影更柔和,并适配 TreeLand 合成器

Influence:

  1. 在 TreeLand 和非 TreeLand 会话中分别打开启动器,验证阴影渲染正确且无
    裁切
  2. 验证 TreeLand(10)与其他合成器(25)下的阴影偏移差异
  3. 测试浅色和深色主题下的阴影显示效果
  4. 确认窗口缩放/移动行为不受影响(系统缩放和移动仍为禁用)
  5. 检查窗口背景模糊与增大后的阴影半径能否正常协同工作

PMS: TASK-396717

Summary by Sourcery

Soften the launcher window shadow and adapt its rendering across compositors and themes.

New Features:

  • Improve the launcher window shadow with a larger blur radius and compositor-specific vertical offsets.
  • Use a warmer dark-theme shadow color to better match the Crystal palette.

Bug Fixes:

  • Improve launcher shadow rendering under the TreeLand compositor and reduce its harsh appearance.

1. Add shadowRadius of 40 to the launcher window for a softer, more
diffuse shadow
2. Make shadowOffset compositor-aware: use Qt.point(0, 10) on TreeLand
and Qt.point(0, 25) elsewhere
3. Tweak dark theme shadow color to a warm dark tone Qt.rgba(0.23, 0.17,
0.17, 0.5) instead of pure black

The previous fixed shadow offset did not render well under the TreeLand
compositor and the shadow lacked radius control, resulting in a harsh
appearance. This change enables a bigger blur radius, adapts the offset
per compositor, and warms the dark theme shadow color to better match
the Crystal color palette.

Log: Launcher window shadow is now softer and adapts to the TreeLand
compositor

Influence:
1. Open the launcher in both TreeLand and non-TreeLand sessions and
verify the shadow renders correctly with no clipping
2. Verify the shadow offset differs between TreeLand (10) and other
compositors (25)
3. Test shadow appearance in light and dark themes
4. Confirm the window remains resizable/movable behavior unaffected
(system resize and move still disabled)
5. Check blur behind the window still works together with the enlarged
shadow radius

feat: 调整启动器窗口阴影设置

1. 为启动器窗口添加 40 的阴影半径,使阴影更柔和、更弥散
2. 使阴影偏移适配不同合成器:TreeLand 上使用 Qt.point(0, 10),其他环境使
用 Qt.point(0, 25)
3. 将深色主题阴影颜色调整为暖暗色调 Qt.rgba(0.23, 0.17, 0.17, 0.5),替代
纯黑色

此前固定的阴影偏移在 TreeLand 合成器下渲染效果不佳,且阴影缺少半径控制,
显得生硬。此修改启用了更大的模糊半径,按合成器自适应偏移,并将深色主题阴
影调整为更贴合 Crystal 调色板的暖色调。

Log: 启动器窗口阴影更柔和,并适配 TreeLand 合成器

Influence:
1. 在 TreeLand 和非 TreeLand 会话中分别打开启动器,验证阴影渲染正确且无
裁切
2. 验证 TreeLand(10)与其他合成器(25)下的阴影偏移差异
3. 测试浅色和深色主题下的阴影显示效果
4. 确认窗口缩放/移动行为不受影响(系统缩放和移动仍为禁用)
5. 检查窗口背景模糊与增大后的阴影半径能否正常协同工作

PMS: TASK-396717
@sourcery-ai

sourcery-ai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Reviewer's Guide

UI

Update the launcher window shadow radius, compositor-specific offset, and dark-theme color while leaving resize, move, and blur settings unchanged.

  • shell-launcher-applet/package/launcheritem.qml L351-353

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 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="shell-launcher-applet/package/launcheritem.qml" line_range="352" />
<code_context>
-        DWindow.shadowOffset: Qt.point(0, 25)
-        DWindow.shadowColor: isDarkTheme ? Qt.rgba(0, 0, 0, 0.5) : Qt.rgba(0, 0, 0, 0.2)
+        DWindow.shadowRadius: 40
+        DWindow.shadowOffset: DesktopIntegration.isTreeLand() ? Qt.point(0, 10) : Qt.point(0, 25)
+        DWindow.shadowColor: isDarkTheme ? Qt.rgba(0.23, 0.17, 0.17, 0.5) : Qt.rgba(0, 0, 0, 0.2)
         D.ColorSelector.family: D.Palette.CrystalColor
</code_context>
<issue_to_address>
**Non-TreeLand shadows use wrong offset**

When the launcher runs under a non-TreeLand Wayland compositor, `DesktopIntegration.isTreeLand()` returns true for every Wayland platform, so `DWindow.shadowOffset` selects 10 instead of 25 and the launcher shadow is positioned incorrectly.

Make `DesktopIntegration.isTreeLand()` distinguish TreeLand from other Wayland compositors before selecting the offset.
</issue_to_address>

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

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

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

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 本次提交为 launcher 窗口阴影样式的微调,变更行数少且逻辑清晰。新增 shadowRadius 属性、根据 TreeLand 窗管调整阴影偏移、微调深色主题阴影颜色,均为纯 UI 视觉调整,无语法逻辑缺陷、无安全漏洞、无性能问题。

🔍 详细分析

1. 语法逻辑 ✅

评价: 语法正确,逻辑清晰 ✅ 通过

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

建议: []


2. 代码质量 ✅

评价: 代码结构清晰,注释完整 ✅ 通过

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

建议: []


3. 代码性能 ✅

评价: 性能良好,资源使用合理 ✅ 通过

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

建议: []


4. 代码安全 🔒

评价: 存在0个安全漏洞 ✅ 通过

🔐 发现 0 个安全漏洞

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

建议: []


💡 改进建议代码示例


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

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, mhduiy

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

@18202781743
18202781743 merged commit c604ad4 into linuxdeepin:master Nov 18, 2026
11 of 12 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