Support Qt 5.11 and fix image provider.
This commit is contained in:
@@ -1,30 +1,31 @@
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.4
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
Item {
|
||||
property bool statusIndicator: false
|
||||
property bool opaqueBackground: false
|
||||
property alias source: avatar.source
|
||||
|
||||
id: item
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: parent.width
|
||||
radius: parent.width / 2
|
||||
width: item.width
|
||||
height: item.width
|
||||
radius: item.width / 2
|
||||
color: "white"
|
||||
visible: opaqueBackground
|
||||
}
|
||||
|
||||
Image {
|
||||
id: avatar
|
||||
width: parent.width
|
||||
height: parent.width
|
||||
width: item.width
|
||||
height: item.width
|
||||
|
||||
mipmap: true
|
||||
layer.enabled: true
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
sourceSize.width: parent.width
|
||||
sourceSize.height: parent.width
|
||||
sourceSize.width: item.width
|
||||
sourceSize.height: item.width
|
||||
|
||||
layer.effect: OpacityMask {
|
||||
maskSource: Item {
|
||||
@@ -38,15 +39,5 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: parent.width
|
||||
radius: parent.width / 2
|
||||
color: "transparent"
|
||||
border.color: "#4caf50"
|
||||
border.width: 4
|
||||
visible: statusIndicator
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user