mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 06:03:57 -06:00
Add initials when no avatar is set
CURA-7418
This commit is contained in:
parent
c58ef1b531
commit
ec1ed80c9f
1 changed files with 19 additions and 0 deletions
|
@ -31,6 +31,25 @@ Column
|
||||||
source: profile["profile_image_url"] ? profile["profile_image_url"] : ""
|
source: profile["profile_image_url"] ? profile["profile_image_url"] : ""
|
||||||
outlineColor: "transparent"
|
outlineColor: "transparent"
|
||||||
}
|
}
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
id: initialCircle
|
||||||
|
width: avatar.width
|
||||||
|
height: avatar.height
|
||||||
|
radius: width
|
||||||
|
color: UM.Theme.getColor("action_button_disabled")
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: initialLabel
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: profile["username"].charAt(0).toUpperCase()
|
||||||
|
font: UM.Theme.getFont("large_bold")
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
anchors.left: avatar.right
|
anchors.left: avatar.right
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue