mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2026-02-23 03:33:57 +11: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:
parent
395a1301a8
commit
4429c03837
1 changed files with 10 additions and 8 deletions
|
|
@ -66,20 +66,22 @@ Item {
|
||||||
Item {
|
Item {
|
||||||
id: contentItemContainer
|
id: contentItemContainer
|
||||||
anchors.fill: root
|
anchors.fill: root
|
||||||
|
layer.enabled: true
|
||||||
|
visible: false
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: contentItem
|
id: contentItem
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: root.contentInsideBorder ? root.border.width : 0
|
anchors.margins: root.contentInsideBorder ? root.border.width : 0
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
layer.enabled: true
|
ShaderEffect {
|
||||||
layer.samplerName: "content"
|
anchors.fill: contentItemContainer
|
||||||
layer.effect: ShaderEffect {
|
|
||||||
fragmentShader: `qrc:/Quickshell/Widgets/shaders/cliprect${root.contentUnderBorder ? "-ub" : ""}.frag.qsb`
|
fragmentShader: `qrc:/Quickshell/Widgets/shaders/cliprect${root.contentUnderBorder ? "-ub" : ""}.frag.qsb`
|
||||||
|
property Item content: contentItemContainer
|
||||||
property Rectangle rect: rectangle
|
property Rectangle rect: rectangle
|
||||||
property color backgroundColor: root.color
|
property color backgroundColor: root.color
|
||||||
property color borderColor: root.border.color
|
property color borderColor: root.border.color
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue