mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-05 21:32:07 -04:00
Finalize m3 shadow & elevation
This commit is contained in:
@@ -34,32 +34,17 @@ Rectangle {
|
||||
clip: false
|
||||
readonly property bool shadowsAllowed: Theme.elevationEnabled && Quickshell.env("DMS_DISABLE_LAYER") !== "true" && Quickshell.env("DMS_DISABLE_LAYER") !== "1"
|
||||
|
||||
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, ((Theme.elevationLevel1 && Theme.elevationLevel1.blurPx !== undefined) ? Theme.elevationLevel1.blurPx : 4) / Theme.elevationBlurMax))
|
||||
shadowScale: 1
|
||||
shadowVerticalOffset: Theme.elevationOffsetY(Theme.elevationLevel1, 1)
|
||||
shadowHorizontalOffset: Theme.elevationOffsetX(Theme.elevationLevel1)
|
||||
blurMax: Theme.elevationBlurMax
|
||||
shadowColor: Theme.elevationShadowColor(Theme.elevationLevel1)
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: root.radius
|
||||
color: root.color
|
||||
border.color: root.border.color
|
||||
border.width: root.border.width
|
||||
}
|
||||
level: Theme.elevationLevel1
|
||||
fallbackOffset: 1
|
||||
targetRadius: root.radius
|
||||
targetColor: root.color
|
||||
borderColor: root.border.color
|
||||
borderWidth: root.border.width
|
||||
shadowEnabled: root.shadowsAllowed
|
||||
}
|
||||
|
||||
color: {
|
||||
|
||||
Reference in New Issue
Block a user