Controls: Avoid visual glitches in Material style

The ElevationEffect renders into a layer. However, as the layer
sampling was not specified as smooth, there was a risk that visual
glitches could be produced when the layer was rendered onto the scene.

Fixes: QTBUG-115759
Pick-to: 6.8
Change-Id: Id793fd224434b9b6e946ed4e31eba79e9f92db8e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
Eirik Aavitsland 2024-08-19 10:44:07 +02:00
parent 7574111a56
commit 8ff616c78c
1 changed files with 1 additions and 0 deletions

View File

@ -204,6 +204,7 @@ Item {
// By rendering as a layer, the shadow will never show through the source item, // By rendering as a layer, the shadow will never show through the source item,
// even when the source item's opacity is less than 1 // even when the source item's opacity is less than 1
layer.enabled: true layer.enabled: true
layer.smooth: true
// The box shadows automatically pick up the size of the source Item and not // The box shadows automatically pick up the size of the source Item and not
// the size of the parent, so we don't need to worry about the extra padding // the size of the parent, so we don't need to worry about the extra padding