mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
42 lines
913 B
QML
42 lines
913 B
QML
import QtQuick 2.7
|
|
import QtGraphicalEffects 1.0
|
|
|
|
import Linphone 1.0
|
|
|
|
// =============================================================================
|
|
|
|
Item {
|
|
id: item
|
|
|
|
property alias source: image.source
|
|
property color backgroundColor: '#00000000'
|
|
property color foregroundColor: '#00000000'
|
|
readonly property alias status: image.status
|
|
property int radius: width/2
|
|
|
|
Rectangle {
|
|
id: backgroundArea
|
|
anchors.fill: parent
|
|
color: item.backgroundColor
|
|
radius: item.radius
|
|
}
|
|
Image {
|
|
id: image
|
|
mipmap: SettingsModel.mipmapEnabled
|
|
anchors.fill: parent
|
|
fillMode: Image.PreserveAspectCrop
|
|
sourceSize.width: parent.width
|
|
sourceSize.height: parent.height
|
|
layer.enabled: true
|
|
layer.effect: OpacityMask {
|
|
maskSource: backgroundArea
|
|
}
|
|
}
|
|
Rectangle {
|
|
id: foregroundArea
|
|
anchors.fill: parent
|
|
visible: color != 'transparent'
|
|
color: item.foregroundColor
|
|
radius: item.radius
|
|
}
|
|
}
|