Skip to content
Snippets Groups Projects
Commit 0c2e58d4 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Steve Lhomme
Browse files

qml: do not probe sibling visibility in `RoundImage.qml`

parent 2a2d3b40
No related branches found
No related tags found
1 merge request!6471qml: fix images are not rounded in DragItem
Pipeline #544915 passed with stage
in 18 minutes and 46 seconds
......@@ -50,7 +50,9 @@ Item {
anchors.fill: parent
visible: (root.radius > 0.0) && (GraphicsInfo.shaderType === GraphicsInfo.RhiShader)
visible: readyForVisibility
readonly property bool readyForVisibility: (root.radius > 0.0) && (GraphicsInfo.shaderType === GraphicsInfo.RhiShader)
supportsAtlasTextures: true
......@@ -84,7 +86,12 @@ Item {
anchors.fill: parent
visible: !shaderEffect.visible
// Image should not be visible when there is rounding and RHI shader is supported.
// This is simply when the shader effect is invisible. However, Do not use `!shaderEffect.visible`,
// because the root item may be invisible (`grabToImage()` call on an invisible
// item case). In that case, shader effect would report invisible although it
// would appear in the grabbed image.
visible: !shaderEffect.readyForVisibility
fillMode: Image.PreserveAspectCrop
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment