diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-02 17:09:49 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-02 17:09:49 +1000 |
| commit | d7802f3c4b594af54817808bf02bb0bacc106868 (patch) | |
| tree | 134565d02cf2d2978dcb7bac68774e3ecbb8d092 /modules/launcher | |
| parent | internal: better curve for button ripples (diff) | |
| download | caelestia-shell-d7802f3c4b594af54817808bf02bb0bacc106868.tar.gz caelestia-shell-d7802f3c4b594af54817808bf02bb0bacc106868.tar.bz2 caelestia-shell-d7802f3c4b594af54817808bf02bb0bacc106868.zip | |
internal: use layer.effect
Also use clipping rect for wallpaper item
Diffstat (limited to 'modules/launcher')
| -rw-r--r-- | modules/launcher/WallpaperItem.qml | 53 |
1 files changed, 20 insertions, 33 deletions
diff --git a/modules/launcher/WallpaperItem.qml b/modules/launcher/WallpaperItem.qml index 862e910..43c01a9 100644 --- a/modules/launcher/WallpaperItem.qml +++ b/modules/launcher/WallpaperItem.qml @@ -2,6 +2,7 @@ import "root:/widgets" import "root:/services" import "root:/config" import Quickshell +import Quickshell.Widgets import QtQuick import QtQuick.Effects @@ -32,34 +33,10 @@ StyledRect { } } - CachingImage { - id: image - - anchors.horizontalCenter: parent.horizontalCenter - y: Appearance.padding.large - - visible: false - path: root.modelData.path - smooth: !root.PathView.view.moving - - width: Config.launcher.sizes.wallpaperWidth - height: width / 16 * 9 - } - - Rectangle { - id: mask - - layer.enabled: true - layer.smooth: true - visible: false - anchors.fill: image - radius: Appearance.rounding.normal - } - RectangularShadow { opacity: root.PathView.isCurrentItem ? 0.7 : 0 - anchors.fill: mask - radius: mask.radius + anchors.fill: image + radius: image.radius color: Colours.palette.m3shadow blur: 10 spread: 3 @@ -69,13 +46,23 @@ StyledRect { } } - MultiEffect { - anchors.fill: image - source: image - maskEnabled: true - maskSource: mask - maskSpreadAtMin: 1 - maskThresholdMin: 0.5 + ClippingRectangle { + id: image + + anchors.horizontalCenter: parent.horizontalCenter + y: Appearance.padding.large + color: "transparent" + radius: Appearance.rounding.normal + + implicitWidth: Config.launcher.sizes.wallpaperWidth + implicitHeight: implicitWidth / 16 * 9 + + CachingImage { + path: root.modelData.path + smooth: !root.PathView.view.moving + + anchors.fill: parent + } } StyledText { |