diff --git a/src/gui/Base/HTile.qml b/src/gui/Base/HTile.qml index c47fc295..7e1b3250 100644 --- a/src/gui/Base/HTile.qml +++ b/src/gui/Base/HTile.qml @@ -17,6 +17,7 @@ HButton { readonly property alias additionalInfo: additionalInfo readonly property alias rightInfo: rightInfo readonly property alias subtitle: subtitle + readonly property Item loadedImage: imageLoader.item property alias contextMenu: contextMenuLoader.sourceComponent @@ -28,6 +29,7 @@ HButton { opacity: tile.contentOpacity HLoader { + id: imageLoader sourceComponent: image } diff --git a/src/gui/Pages/Chat/RoomPane/MemberDelegate.qml b/src/gui/Pages/Chat/RoomPane/MemberDelegate.qml index b19b2eb9..384ef55f 100644 --- a/src/gui/Pages/Chat/RoomPane/MemberDelegate.qml +++ b/src/gui/Pages/Chat/RoomPane/MemberDelegate.qml @@ -38,4 +38,11 @@ HTileDelegate { Behavior on title.color { HColorAnimation {} } Behavior on contentOpacity { HNumberAnimation {} } + Behavior on spacing { HNumberAnimation {} } + + Binding on spacing { + value: (roomPane.minimumSize - loadedImage.width) / 2 + when: loadedImage && + roomPane.width < loadedImage.width + theme.spacing * 2 + } } diff --git a/src/gui/Pages/Chat/RoomPane/RoomPane.qml b/src/gui/Pages/Chat/RoomPane/RoomPane.qml index 15ebd457..9e1496e8 100644 --- a/src/gui/Pages/Chat/RoomPane/RoomPane.qml +++ b/src/gui/Pages/Chat/RoomPane/RoomPane.qml @@ -30,6 +30,11 @@ HDrawer { } } + + readonly property alias buttonRepeater: buttonRepeater + readonly property alias swipeView: swipeView + + HColumnLayout { anchors.fill: parent