Cura/resources/qml/Accounts/AvatarImage.qml
Diego Prado Gesto 77a1b08f38 Add the callout panel to the account panel, with the two components that
will show up when the user is logged in or when not.

Contributes to CURA-5784.
2018-10-09 15:58:13 +02:00

44 lines
No EOL
975 B
QML

// Copyright (c) 2018 Ultimaker B.V.
import QtQuick 2.7
import QtQuick.Controls 2.1
import QtGraphicalEffects 1.0
import UM 1.4 as UM
Item
{
id: avatar
property var source
Image
{
id: profileImage
source: avatar.source ? avatar.source : UM.Theme.getImage("avatar_default")
sourceSize: Qt.size(parent.width, parent.height)
width: parent.width
height: parent.height
fillMode: Image.PreserveAspectCrop
visible: false
}
UM.RecolorImage
{
id: profileImageMask
source: UM.Theme.getIcon("circle_mask")
sourceSize: Qt.size(parent.width, parent.height)
width: parent.width
height: parent.height
color: UM.Theme.getColor("topheader_background")
visible: false
}
OpacityMask
{
anchors.fill: profileImage
source: profileImage
maskSource: profileImageMask
cached: true
invert: false
}
}