Support Qt 5.11 and fix image provider.

This commit is contained in:
Black Hat
2018-07-07 17:38:20 +08:00
parent a850224c98
commit 17fa7cc7da
24 changed files with 666 additions and 808 deletions

View File

@@ -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
}
}
}