mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 05:07:50 -06:00
Create an AvatarImage component that will show the profile image of the
user. Still WIP. Create an AccountWidget (WIP) that shows the avatar image and the dropdown menu to manage accounts. Contributes to CURA-5784.
This commit is contained in:
parent
41add97b13
commit
2ffcf03f43
7 changed files with 193 additions and 3 deletions
42
resources/qml/Skeleton/components/AvatarImage.qml
Normal file
42
resources/qml/Skeleton/components/AvatarImage.qml
Normal file
|
@ -0,0 +1,42 @@
|
|||
// 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
|
||||
|
||||
Image
|
||||
{
|
||||
id: profileImage
|
||||
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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue