Triangles fade from bottom and behave better on antialiased mask edges

This commit is contained in:
2025-12-28 13:29:22 -08:00
parent b9b05ccf4d
commit 92ffe572fc
4 changed files with 45 additions and 11 deletions

View File

@@ -155,7 +155,7 @@ PanelWindow {
gradient: Gradient {
orientation: Gradient.Horizontal
GradientStop {
color: Qt.darker(button.color, 8)
color: Qt.darker(button.color, 16)
position: 0
}
GradientStop {
@@ -205,17 +205,24 @@ PanelWindow {
onObjectAdded: (index, obj) => obj.parent = triangles
}
}
MultiEffect {
source: triangles
Rectangle {
id: triMask
x: triangles.x
y: triangles.y
width: triangles.width
height: triangles.height
visible: false
layer.enabled: true
radius: root.radius
color: "red"
}
ShaderEffect {
anchors.fill: triangles
maskEnabled: true
maskSource: ShaderEffectSource { sourceItem: Rectangle {
x: triangles.x
y: triangles.y
width: triangles.width
height: triangles.height
radius: root.radius
} }
property var src: triangles
property var mask: triMask
vertexShader: "default.vert.qsb"
fragmentShader: "trifade.frag.qsb"
}
Item {