feat(StatusLetterIdenticon): Expose the text component

Aliased the text compoenent so that its color, text value can be set from outside
This commit is contained in:
Khushboo Mehta 2021-08-17 18:46:44 +02:00 committed by Michał Cieślak
parent 4fe2d82208
commit bff34a2e21
1 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import StatusQ.Core.Theme 0.1
Rectangle {
id: statusLetterIdenticon
property alias identiconText: identiconText
property string name
property int letterSize: 21
@ -14,6 +15,7 @@ Rectangle {
radius: width / 2
StatusBaseText {
id: identiconText
text: ((statusLetterIdenticon.name.charAt(0) === "#")
|| (statusLetterIdenticon.name.charAt(0) === "@") ?
statusLetterIdenticon.name.charAt(1) : statusLetterIdenticon.name.charAt(0)).toUpperCase()