add drop shadow to wp selector
This commit is contained in:
parent
759cdb87cc
commit
0405e2d3dc
1 changed files with 15 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ import Quickshell.Widgets
|
||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Qt.labs.folderlistmodel 2.11
|
import Qt.labs.folderlistmodel 2.11
|
||||||
|
import QtQuick.Effects
|
||||||
|
|
||||||
import qs
|
import qs
|
||||||
import qs.settings
|
import qs.settings
|
||||||
|
|
@ -65,7 +66,7 @@ Rectangle {
|
||||||
wallPicker.visible = false;
|
wallPicker.visible = false;
|
||||||
}
|
}
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: Colors.base02
|
color: Colors.base01
|
||||||
radius: Config.rounding
|
radius: Config.rounding
|
||||||
border.width: 2
|
border.width: 2
|
||||||
border.color: Colors.base0D
|
border.color: Colors.base0D
|
||||||
|
|
@ -74,15 +75,25 @@ Rectangle {
|
||||||
id: wallpaperLayout
|
id: wallpaperLayout
|
||||||
clip: true
|
clip: true
|
||||||
snapMode: GridView.SnapOneRow
|
snapMode: GridView.SnapOneRow
|
||||||
|
anchors.fill: parent
|
||||||
flow: GridView.FlowTopToBottom
|
flow: GridView.FlowTopToBottom
|
||||||
width: parent.width - 10
|
width: parent.width - 10
|
||||||
height: parent.height - 10
|
height: parent.height - 10
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
model: wallpaperList
|
model: wallpaperList
|
||||||
cellWidth: ((wallPicker.width - wallPicker.margins.left * 2) / 5) + 5
|
cellWidth: ((wallPicker.width) / 5) - 2
|
||||||
cellHeight: (wallPicker.height - wallPicker.margins.bottom / 2)
|
cellHeight: wallPicker.height
|
||||||
delegate: ClippingWrapperRectangle {
|
delegate: ClippingWrapperRectangle {
|
||||||
id: wallTile
|
id: wallTile
|
||||||
|
layer.enabled: true
|
||||||
|
layer.effect: MultiEffect {
|
||||||
|
id: dropShadow
|
||||||
|
source: wallTile
|
||||||
|
shadowEnabled: true
|
||||||
|
shadowHorizontalOffset: 10
|
||||||
|
shadowVerticalOffset: 10
|
||||||
|
shadowColor: "#020202"
|
||||||
|
}
|
||||||
margin: 10
|
margin: 10
|
||||||
required property var modelData
|
required property var modelData
|
||||||
color: 'transparent'
|
color: 'transparent'
|
||||||
|
|
@ -107,6 +118,7 @@ Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
|
hoverEnabled: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Config.wallpaper = wallTile.modelData.filePath;
|
Config.wallpaper = wallTile.modelData.filePath;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue