fix(StatusListItem): adjust placement of title icons (#888)

Needed for https://github.com/status-im/status-desktop/issues/6972
This commit is contained in:
PavelS 2022-09-07 19:28:52 +03:00 committed by Michał Cieślak
parent 85ad799218
commit 97c3b6c7df
2 changed files with 12 additions and 1 deletions

View File

@ -507,6 +507,14 @@ ColumnLayout {
asset.isLetterIdenticon: true asset.isLetterIdenticon: true
} }
StatusMemberListItem {
nickName: "untrusted-admin.eth"
asset.isLetterIdenticon: true
isUntrustworthy: true
isAdmin: true
isContact: true
}
StatusMemberListItem { StatusMemberListItem {
nickName: "This girl I know from work" nickName: "This girl I know from work"
userName: "annabelle" userName: "annabelle"

View File

@ -175,7 +175,7 @@ Rectangle {
anchors.left: iconOrImage.active ? iconOrImage.right : parent.left anchors.left: iconOrImage.active ? iconOrImage.right : parent.left
anchors.right: statusListItemLabel.visible ? statusListItemLabel.left : statusListItemComponentsSlot.left anchors.right: statusListItemLabel.visible ? statusListItemLabel.left : statusListItemComponentsSlot.left
anchors.leftMargin: iconOrImage.active ? 16 : statusListItem.leftPadding anchors.leftMargin: iconOrImage.active ? 16 : statusListItem.leftPadding
anchors.rightMargin: statusListItem.rightPadding anchors.rightMargin: Math.max(statusListItem.rightPadding, titleIconsRow.requiredWidth)
anchors.verticalCenter: bottomModel.length === 0 ? parent.verticalCenter : undefined anchors.verticalCenter: bottomModel.length === 0 ? parent.verticalCenter : undefined
height: childrenRect.height height: childrenRect.height
@ -271,6 +271,9 @@ Rectangle {
Loader { Loader {
id: titleIconsRow id: titleIconsRow
readonly property int requiredWidth: active ? width + anchors.leftMargin * 2 : 0
anchors.left: !statusListItem.titleAsideText ? statusListItemTitle.right : statusListItemTitleAsideText.right anchors.left: !statusListItem.titleAsideText ? statusListItemTitle.right : statusListItemTitleAsideText.right
anchors.verticalCenter: statusListItemTitle.verticalCenter anchors.verticalCenter: statusListItemTitle.verticalCenter
anchors.leftMargin: 4 anchors.leftMargin: 4