feat(StatusLetterIdenticon): simplify names of properties
Closes: #14439
This commit is contained in:
parent
a153279e77
commit
b764446568
|
@ -21,10 +21,10 @@ Rectangle {
|
|||
//
|
||||
// characterLen is ignored
|
||||
property bool useAcronymForLetterIdenticon: false
|
||||
property bool strictBackgroundColor: !useAcronymForLetterIdenticon
|
||||
property bool backgroundWithAlpha: useAcronymForLetterIdenticon
|
||||
|
||||
color: {
|
||||
if (root.strictBackgroundColor)
|
||||
if (!root.backgroundWithAlpha)
|
||||
return root.letterIdenticonColor
|
||||
|
||||
return Qt.rgba(root.letterIdenticonColor.r,
|
||||
|
@ -57,7 +57,7 @@ Rectangle {
|
|||
font.weight: Font.Bold
|
||||
font.pixelSize: root.letterSize
|
||||
color: {
|
||||
if (!root.strictBackgroundColor)
|
||||
if (root.backgroundWithAlpha)
|
||||
return root.letterIdenticonColor
|
||||
|
||||
return d.luminance(root.letterIdenticonColor) > 0.5 ? Qt.rgba(0, 0, 0, 0.5) : Qt.rgba(1, 1, 1, 0.7)
|
||||
|
|
|
@ -120,7 +120,7 @@ Loader {
|
|||
letterSize: root.asset.letterSize
|
||||
charactersLen: root.asset.charactersLen
|
||||
useAcronymForLetterIdenticon: root.asset.useAcronymForLetterIdenticon
|
||||
strictBackgroundColor: root.asset.useLetterIdenticonStrictBgColor
|
||||
backgroundWithAlpha: root.asset.letterIdenticonBgWithAlpha
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ QtObject {
|
|||
|
||||
property bool isLetterIdenticon
|
||||
property bool useAcronymForLetterIdenticon: true
|
||||
property bool useLetterIdenticonStrictBgColor: true
|
||||
property bool letterIdenticonBgWithAlpha: false
|
||||
property int letterSize: emoji ? 11 : (charactersLen == 1 ? _oneLetterSize : _twoLettersSize)
|
||||
property int charactersLen: 1
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ StatusListItem {
|
|||
height: 40
|
||||
color: Utils.getColorForId(root.colorId)
|
||||
isLetterIdenticon: true
|
||||
useLetterIdenticonStrictBgColor: false
|
||||
letterIdenticonBgWithAlpha: true
|
||||
}
|
||||
|
||||
statusListItemIcon.hoverEnabled: true
|
||||
|
|
|
@ -562,7 +562,7 @@ StatusModal {
|
|||
emoji: model.emoji
|
||||
color: model.color
|
||||
isLetterIdenticon: !model.icon
|
||||
useLetterIdenticonStrictBgColor: model.type !== AddEditSavedAddressPopup.CardType.SavedAddress
|
||||
letterIdenticonBgWithAlpha: model.type === AddEditSavedAddressPopup.CardType.SavedAddress
|
||||
charactersLen: 2
|
||||
}
|
||||
}
|
||||
|
|
|
@ -233,7 +233,7 @@ StatusModal {
|
|||
emoji: root.selectedAccount.emoji
|
||||
charactersLen: 1
|
||||
isLetterIdenticon: root.selectedAccount.name && !root.selectedAccount.emoji
|
||||
useLetterIdenticonStrictBgColor: !root.selectedAccount.name || root.selectedAccount.emoji
|
||||
letterIdenticonBgWithAlpha: root.selectedAccount.name && !root.selectedAccount.emoji
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ StatusDialog {
|
|||
asset {
|
||||
color: Utils.getColorForId(root.colorId)
|
||||
isLetterIdenticon: true
|
||||
useLetterIdenticonStrictBgColor: false
|
||||
letterIdenticonBgWithAlpha: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue