1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-05 13:22:06 -04:00

Finalize m3 shadow & elevation

This commit is contained in:
purian23
2026-03-01 00:43:46 -05:00
parent 36951f82c6
commit 1452c85946
21 changed files with 290 additions and 428 deletions

View File

@@ -132,32 +132,21 @@ Rectangle {
id: cardHoverHandler
}
Item {
ElevationShadow {
id: shadowLayer
anchors.fill: parent
z: -1
layer.enabled: root.shadowsAllowed
layer.effect: MultiEffect {
autoPaddingEnabled: true
shadowEnabled: root.shadowsAllowed
blurEnabled: false
maskEnabled: false
shadowBlur: Math.max(0, Math.min(1, root.shadowBlurPx / Theme.elevationBlurMax))
shadowScale: 1
shadowVerticalOffset: root.shadowOffsetYPx
shadowHorizontalOffset: root.shadowOffsetXPx
blurMax: Theme.elevationBlurMax
shadowColor: root.shadowElevation ? Theme.elevationShadowColor(root.shadowElevation) : "transparent"
}
Rectangle {
anchors.fill: parent
radius: root.radius
color: root.color
border.color: root.border.color
border.width: root.border.width
}
level: root.shadowElevation
targetRadius: root.radius
targetColor: root.color
borderColor: root.border.color
borderWidth: root.border.width
shadowBlurPx: root.shadowBlurPx
shadowSpreadPx: 0
shadowOffsetX: root.shadowOffsetXPx
shadowOffsetY: root.shadowOffsetYPx
shadowColor: root.shadowElevation ? Theme.elevationShadowColor(root.shadowElevation) : "transparent"
shadowEnabled: root.shadowsAllowed
}
Rectangle {