From 167f0e54b9bfff4dbb98fc38394e786e44fab815 Mon Sep 17 00:00:00 2001 From: yeshanshan Date: Wed, 18 Nov 2026 13:36:33 +0800 Subject: [PATCH] feat: adjust launcher window shadow settings [cherry-pick] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 c604ad42eadc1f716cf46d44cdb727e7c2ac0196) --- shell-launcher-applet/package/launcheritem.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell-launcher-applet/package/launcheritem.qml b/shell-launcher-applet/package/launcheritem.qml index 9a40b9ab..ce7eae26 100644 --- a/shell-launcher-applet/package/launcheritem.qml +++ b/shell-launcher-applet/package/launcheritem.qml @@ -348,8 +348,9 @@ AppletItem { DWindow.enableSystemResize: false DWindow.enableSystemMove: false 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 {