Kylin/Fluent/qml/Shadow.qml

23 lines
587 B
QML
Raw Permalink Normal View History

2024-08-31 04:13:21 +08:00
import QtQuick as Quick
import Fluent
2024-08-23 00:04:16 +08:00
2024-08-31 04:13:21 +08:00
Quick.Item {
property Quick.color color: Theme.dark ? "#000000" : "#999999"
2024-08-23 00:04:16 +08:00
property int elevation: 5
property int radius: 4
id:control
anchors.fill: parent
2024-08-31 04:13:21 +08:00
Quick.Repeater{
2024-08-23 00:04:16 +08:00
model: elevation
2024-08-31 04:13:21 +08:00
Quick.Rectangle{
2024-08-23 00:04:16 +08:00
anchors.fill: parent
color: "#00000000"
opacity: 0.01 * (elevation-index+1)
anchors.margins: -index
radius: control.radius+index
border.width: index
border.color: control.color
}
}
}