feat(StatusLetterIdenticon): make useAcronymForLetterIdenticon true by default

This commit is contained in:
Michał Cieślak 2024-05-17 19:29:05 +02:00 committed by Michał
parent b2ab3a455a
commit a153279e77
10 changed files with 9 additions and 11 deletions

View File

@ -32,6 +32,8 @@ TabButton {
asset.height: asset.isImage ? 28 : statusIconTabButton.icon.height
asset.color: (statusIconTabButton.hovered || highlighted || statusIconTabButton.checked) ? Theme.palette.primaryColor1 : statusIconTabButton.icon.color
asset.isLetterIdenticon: statusIconTabButton.name !== "" && !asset.isImage
asset.charactersLen: 1
asset.useAcronymForLetterIdenticon: false
name: statusIconTabButton.name
}
}

View File

@ -12,7 +12,6 @@ StatusIconTabButton {
property Component popupMenu
property alias stateIcon: stateIcon
StatusToolTip {
id: statusTooltip
visible: statusNavBarTabButton.hovered && !!statusTooltip.text

View File

@ -15,8 +15,8 @@ QtObject {
property int rotation
property bool isLetterIdenticon
property bool useAcronymForLetterIdenticon
property bool useLetterIdenticonStrictBgColor: !useAcronymForLetterIdenticon
property bool useAcronymForLetterIdenticon: true
property bool useLetterIdenticonStrictBgColor: true
property int letterSize: emoji ? 11 : (charactersLen == 1 ? _oneLetterSize : _twoLettersSize)
property int charactersLen: 1

View File

@ -84,7 +84,6 @@ Item {
asset.height: 86
asset.letterSize: 32
asset.color: Utils.colorForPubkey(d.publicKey)
asset.charactersLen: 2
asset.isImage: !!asset.name
asset.imgIsIdenticon: false
asset.name: d.image

View File

@ -63,7 +63,7 @@ StatusListItem {
height: 40
color: Utils.getColorForId(root.colorId)
isLetterIdenticon: true
useAcronymForLetterIdenticon: true
useLetterIdenticonStrictBgColor: false
}
statusListItemIcon.hoverEnabled: true

View File

@ -562,7 +562,7 @@ StatusModal {
emoji: model.emoji
color: model.color
isLetterIdenticon: !model.icon
useAcronymForLetterIdenticon: model.type === AddEditSavedAddressPopup.CardType.SavedAddress
useLetterIdenticonStrictBgColor: model.type !== AddEditSavedAddressPopup.CardType.SavedAddress
charactersLen: 2
}
}

View File

@ -233,13 +233,12 @@ StatusModal {
emoji: root.selectedAccount.emoji
charactersLen: 1
isLetterIdenticon: root.selectedAccount.name && !root.selectedAccount.emoji
useAcronymForLetterIdenticon: root.selectedAccount.name && !root.selectedAccount.emoji
useLetterIdenticonStrictBgColor: !root.selectedAccount.name || root.selectedAccount.emoji
}
}
}
}
Item {
width: parent.width
height: Math.max(flow.height, editButton.height)

View File

@ -55,7 +55,7 @@ StatusDialog {
asset {
color: Utils.getColorForId(root.colorId)
isLetterIdenticon: true
useAcronymForLetterIdenticon: true
useLetterIdenticonStrictBgColor: false
}
}
}

View File

@ -715,7 +715,7 @@ Item {
implicitHeight: 32
identicon.asset.width: width
identicon.asset.height: height
identicon.asset.charactersLen: 2
identicon.asset.useAcronymForLetterIdenticon: true
identicon.asset.color: Utils.colorForPubkey(appMain.rootStore.userProfileInst.pubKey)
identicon.ringSettings.ringSpecModel: Utils.getColorHashAsJson(appMain.rootStore.userProfileInst.pubKey,
appMain.rootStore.userProfileInst.preferredName)

View File

@ -36,7 +36,6 @@ Loader {
height: root.imageHeight
color: Utils.colorForColorId(root.colorId)
name: root.image
charactersLen: 2
isImage: true
}
ringSettings {