123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- import QtQuick 2.10
- import QtQuick.Controls 2.3
- import UM 1.4 as UM
- Item
- {
-
-
- id: avatar
- property alias source: profileImage.source
- property alias outlineColor: profileImageOutline.color
-
-
- property alias maskColor: profileImageMask.color
- property bool hasAvatar: source != ""
- Rectangle
- {
- id: profileImageBackground
- anchors.fill: parent
- radius: width
- color: "white"
- }
- Image
- {
- id: profileImage
- anchors.fill: parent
- fillMode: Image.PreserveAspectCrop
- visible: hasAvatar
- mipmap: true
- }
- UM.ColorImage
- {
-
-
- id: profileImageMask
- anchors.fill: parent
- source: UM.Theme.getIcon("CircleMask")
- }
- UM.ColorImage
- {
-
- id: profileImageOutline
- anchors.fill: parent
- anchors.margins: .25
- visible: hasAvatar
- source: UM.Theme.getIcon("CircleOutline")
- color: UM.Theme.getColor("account_widget_outline_active")
- }
- }
|