mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
widgets/cliprect: fix ShaderEffect warnings on reload
layer.effect causes warnings on reload for an unknown reason which seems to be ownership or destruction time related. This commit uses an alternate strategy to create the shader which does not show this warning.
This commit is contained in:
1 file changed
+10
-8
@@ -66,20 +66,22 @@ Item {
|
||||
Item {
|
||||
id: contentItemContainer
|
||||
anchors.fill: root
|
||||
layer.enabled: true
|
||||
visible: false
|
||||
|
||||
Item {
|
||||
id: contentItem
|
||||
anchors.fill: parent
|
||||
anchors.margins: root.contentInsideBorder ? root.border.width : 0
|
||||
}
|
||||
}
|
||||
|
||||
layer.enabled: true
|
||||
layer.samplerName: "content"
|
||||
layer.effect: ShaderEffect {
|
||||
fragmentShader: `qrc:/Quickshell/Widgets/shaders/cliprect${root.contentUnderBorder ? "-ub" : ""}.frag.qsb`
|
||||
property Rectangle rect: rectangle
|
||||
property color backgroundColor: root.color
|
||||
property color borderColor: root.border.color
|
||||
}
|
||||
ShaderEffect {
|
||||
anchors.fill: contentItemContainer
|
||||
fragmentShader: `qrc:/Quickshell/Widgets/shaders/cliprect${root.contentUnderBorder ? "-ub" : ""}.frag.qsb`
|
||||
property Item content: contentItemContainer
|
||||
property Rectangle rect: rectangle
|
||||
property color backgroundColor: root.color
|
||||
property color borderColor: root.border.color
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user