Fix MemberDelegate v padding when collapsed

This commit is contained in:
miruka 2019-08-11 23:01:14 -04:00
parent 9924b0565a
commit fbd7c45fe4

View File

@ -6,36 +6,32 @@ import "../../utils.js" as Utils
HInteractiveRectangle { HInteractiveRectangle {
id: memberDelegate id: memberDelegate
width: memberList.width width: memberList.width
height: childrenRect.height height: rowLayout.height
Row { HRowLayout {
width: parent.width - leftPadding * 2 id: rowLayout
padding: roomSidePane.currentSpacing / 2 x: roomSidePane.currentSpacing
leftPadding: roomSidePane.currentSpacing width: parent.width - roomSidePane.currentSpacing * 1.5
rightPadding: 0 height: avatar.height + roomSidePane.currentSpacing / 1.5
spacing: roomSidePane.currentSpacing
HRowLayout { HUserAvatar {
width: parent.width id: avatar
spacing: roomSidePane.currentSpacing userId: model.user_id
displayName: model.display_name
avatarUrl: model.avatar_url
}
HUserAvatar { HColumnLayout {
id: avatar Layout.fillWidth: true
userId: model.user_id
displayName: model.display_name HLabel {
avatarUrl: model.avatar_url id: memberName
} text: model.display_name || model.user_id
elide: Text.ElideRight
verticalAlignment: Qt.AlignVCenter
HColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
HLabel {
id: memberName
text: model.display_name || model.user_id
elide: Text.ElideRight
verticalAlignment: Qt.AlignVCenter
Layout.fillWidth: true
}
} }
} }
} }