1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-15 07:35:20 -04:00
Files
DankMaterialShell/quickshell/Modules/Frame/FrameBorder.qml
T
purian23 8d94117a69 Cleanup
2026-06-12 10:56:16 -04:00

30 lines
1.1 KiB
QML

pragma ComponentBehavior: Bound
import QtQuick
import qs.Common
// Frame perimeter ring with rounded cutout (SDF).
Item {
id: root
anchors.fill: parent
required property real cutoutTopInset
required property real cutoutBottomInset
required property real cutoutLeftInset
required property real cutoutRightInset
required property real cutoutRadius
property color borderColor: Qt.rgba(SettingsData.effectiveFrameColor.r, SettingsData.effectiveFrameColor.g, SettingsData.effectiveFrameColor.b, SettingsData.frameOpacity)
ShaderEffect {
anchors.fill: parent
fragmentShader: Qt.resolvedUrl("../../Shaders/qsb/frame_arc.frag.qsb")
property real widthPx: width
property real heightPx: height
property real cutoutRadius: root.cutoutRadius
property vector4d cutout: Qt.vector4d(root.cutoutLeftInset, root.cutoutTopInset, root.width - root.cutoutRightInset, root.height - root.cutoutBottomInset)
property vector4d surfaceColor: Qt.vector4d(root.borderColor.r, root.borderColor.g, root.borderColor.b, root.borderColor.a)
}
}