Skip to content

feat: adjust launcher window shadow settings [cherry-pick] - #860

Merged
18202781743 merged 1 commit into
linuxdeepin:develop/2500u3from
18202781743:pick-to/1878badbb37e1636cd7abdb04cbfd4becc901cda
Nov 25, 2026
Merged

18202781743 merged 1 commit into
linuxdeepin:develop/2500u3from
18202781743:pick-to/1878badbb37e1636cd7abdb04cbfd4becc901cda

Conversation

@18202781743

@18202781743 18202781743 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Cherry-pick commit c604ad4 to develop/2500u3.

Source pull request #854

  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

Improve the launcher window shadow appearance across compositors and themes.

Bug Fixes:

  • Improve launcher window shadow rendering in TreeLand sessions by adapting the shadow offset to the compositor.

Enhancements:

  • Soften the launcher window shadow with a larger radius and use a warmer dark-theme shadow color.

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
(cherry picked from commit c604ad4)
@sourcery-ai

sourcery-ai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Reviewer's Guide

UI

Adjust the launcher window shadow radius, compositor-dependent offset, and dark-theme color while leaving its existing movement, resizing, 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 2 issues

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 the binding selects the 10-pixel offset instead of 25 and the launcher shows the wrong shadow placement.

Use a check that identifies TreeLand specifically rather than treating every Wayland platform as TreeLand.
</issue_to_address>

### Comment 2
<location path="shell-launcher-applet/package/launcheritem.qml" line_range="351-354" />
<code_context>
         DWindow.enableBlurWindow: true
-        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

         StyledBehindWindowBlur {
</code_context>
<issue_to_address>
**Other launcher window keeps old shadow**

When the launcher is presented through the `qml/Main.qml` windowed path, when the launcher uses the window in `qml/Main.qml`, that window still has no `DWindow.shadowRadius`, `shadowOffset`, or `shadowColor` settings, so this launcher path keeps its previous shadow instead of getting the updated appearance.

Apply the intended shadow settings to that window too, or confirm that this path is no longer used.
</issue_to_address>

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

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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · 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 the binding selects the 10-pixel offset instead of 25 and the launcher shows the wrong shadow placement.

Use a check that identifies TreeLand specifically rather than treating every Wayland platform as TreeLand.

Prompt for AI agents
In `shell-launcher-applet/package/launcheritem.qml` at line 352:

**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 the binding selects the 10-pixel offset instead of 25 and the launcher shows the wrong shadow placement.

Use a check that identifies TreeLand specifically rather than treating every Wayland platform as TreeLand.

Comment on lines +351 to 354
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Other launcher window keeps old shadow

When the launcher is presented through the qml/Main.qml windowed path, when the launcher uses the window in qml/Main.qml, that window still has no DWindow.shadowRadius, shadowOffset, or shadowColor settings, so this launcher path keeps its previous shadow instead of getting the updated appearance.

Apply the intended shadow settings to that window too, or confirm that this path is no longer used.

Prompt for AI agents
In `shell-launcher-applet/package/launcheritem.qml` at lines 351-354:

**Other launcher window keeps old shadow**

When the launcher is presented through the `qml/Main.qml` windowed path, when the launcher uses the window in `qml/Main.qml`, that window still has no `DWindow.shadowRadius`, `shadowOffset`, or `shadowColor` settings, so this launcher path keeps its previous shadow instead of getting the updated appearance.

Apply the intended shadow settings to that window too, or confirm that this path is no longer used.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, BLumia, wjyrich

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 d7807c0 into linuxdeepin:develop/2500u3 Nov 25, 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.

4 participants