From fbd7c45fe4acd06980b6c61bd19efd0893711ecd Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 11 Aug 2019 23:01:14 -0400 Subject: [PATCH] Fix MemberDelegate v padding when collapsed --- src/qml/Chat/RoomSidePane/MemberDelegate.qml | 46 +++++++++----------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/src/qml/Chat/RoomSidePane/MemberDelegate.qml b/src/qml/Chat/RoomSidePane/MemberDelegate.qml index 23d5742e..4ad15c0a 100644 --- a/src/qml/Chat/RoomSidePane/MemberDelegate.qml +++ b/src/qml/Chat/RoomSidePane/MemberDelegate.qml @@ -6,36 +6,32 @@ import "../../utils.js" as Utils HInteractiveRectangle { id: memberDelegate width: memberList.width - height: childrenRect.height + height: rowLayout.height - Row { - width: parent.width - leftPadding * 2 - padding: roomSidePane.currentSpacing / 2 - leftPadding: roomSidePane.currentSpacing - rightPadding: 0 + HRowLayout { + id: rowLayout + x: roomSidePane.currentSpacing + width: parent.width - roomSidePane.currentSpacing * 1.5 + height: avatar.height + roomSidePane.currentSpacing / 1.5 + spacing: roomSidePane.currentSpacing - HRowLayout { - width: parent.width - spacing: roomSidePane.currentSpacing + HUserAvatar { + id: avatar + userId: model.user_id + displayName: model.display_name + avatarUrl: model.avatar_url + } - HUserAvatar { - id: avatar - userId: model.user_id - displayName: model.display_name - avatarUrl: model.avatar_url - } + HColumnLayout { + Layout.fillWidth: true + + HLabel { + id: memberName + text: model.display_name || model.user_id + elide: Text.ElideRight + verticalAlignment: Qt.AlignVCenter - HColumnLayout { Layout.fillWidth: true - - HLabel { - id: memberName - text: model.display_name || model.user_id - elide: Text.ElideRight - verticalAlignment: Qt.AlignVCenter - - Layout.fillWidth: true - } } } }