add drop shadow to wp selector

This commit is contained in:
lucy 2026-07-26 20:34:26 +02:00
commit 0405e2d3dc

View file

@ -5,6 +5,7 @@ import Quickshell.Widgets
import Quickshell.Hyprland
import QtQuick
import Qt.labs.folderlistmodel 2.11
import QtQuick.Effects
import qs
import qs.settings
@ -65,7 +66,7 @@ Rectangle {
wallPicker.visible = false;
}
anchors.fill: parent
color: Colors.base02
color: Colors.base01
radius: Config.rounding
border.width: 2
border.color: Colors.base0D
@ -74,15 +75,25 @@ Rectangle {
id: wallpaperLayout
clip: true
snapMode: GridView.SnapOneRow
anchors.fill: parent
flow: GridView.FlowTopToBottom
width: parent.width - 10
height: parent.height - 10
anchors.centerIn: parent
model: wallpaperList
cellWidth: ((wallPicker.width - wallPicker.margins.left * 2) / 5) + 5
cellHeight: (wallPicker.height - wallPicker.margins.bottom / 2)
cellWidth: ((wallPicker.width) / 5) - 2
cellHeight: wallPicker.height
delegate: ClippingWrapperRectangle {
id: wallTile
layer.enabled: true
layer.effect: MultiEffect {
id: dropShadow
source: wallTile
shadowEnabled: true
shadowHorizontalOffset: 10
shadowVerticalOffset: 10
shadowColor: "#020202"
}
margin: 10
required property var modelData
color: 'transparent'
@ -107,6 +118,7 @@ Rectangle {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton
hoverEnabled: true
onClicked: {
Config.wallpaper = wallTile.modelData.filePath;
}