limit avatar name to 14 characters + … at the end

This commit is contained in:
Alexander Ivash 2018-05-22 02:39:55 +03:00
parent ee856266c7
commit 9a4ea07614

View file

@ -385,7 +385,10 @@ Rectangle {
TextStyle3 {
id: avatarNameLabel
text: getAvatarName()
text: {
var avatarName = getAvatarName();
return avatarName.length <= 14 ? avatarName : avatarName.substring(0, 14) + '...'
}
anchors.left: avatarImage.right
anchors.leftMargin: 30
anchors.top: star.bottom