diff --git a/modules/Material/Extras/CircleItem.qml b/modules/Material/Extras/CircleMask.qml similarity index 86% rename from modules/Material/Extras/CircleItem.qml rename to modules/Material/Extras/CircleMask.qml index 60c61fd..c252181 100644 --- a/modules/Material/Extras/CircleItem.qml +++ b/modules/Material/Extras/CircleMask.qml @@ -23,20 +23,22 @@ import QtGraphicalEffects 1.0 Item { id: item - property Item content + property alias source: mask.source - Image { - id: mask - source: Qt.resolvedUrl("images/circle.png") + Rectangle { + id: circleMask anchors.fill: parent + smooth: true visible: false - mipmap: true + + radius: Math.max(width/2, height/2) } OpacityMask { + id: mask + anchors.fill: parent - source: content - maskSource: mask + maskSource: circleMask } } diff --git a/modules/Material/Extras/qmldir b/modules/Material/Extras/qmldir index 87ec376..a6edb5a 100644 --- a/modules/Material/Extras/qmldir +++ b/modules/Material/Extras/qmldir @@ -1,7 +1,7 @@ module Material.Extras CircleImage 0.1 CircleImage.qml -CircleItem 0.1 CircleItem.qml +CircleMask 0.1 CircleMask.qml Image 0.1 Image.qml ColumnFlow 0.1 ColumnFlow.qml Document 0.1 Document.qml