diff --git a/src/commoncomponents/Avatar.qml b/src/commoncomponents/Avatar.qml index bb6662b7..45e66fbb 100644 --- a/src/commoncomponents/Avatar.qml +++ b/src/commoncomponents/Avatar.qml @@ -29,6 +29,7 @@ Item { enum Mode { Account, Contact, Conversation } property int mode: Avatar.Mode.Account + property alias sourceSize: image.sourceSize property string imageId diff --git a/src/mainview/components/ParticipantOverlay.qml b/src/mainview/components/ParticipantOverlay.qml index a223b417..c7ebb70b 100644 --- a/src/mainview/components/ParticipantOverlay.qml +++ b/src/mainview/components/ParticipantOverlay.qml @@ -171,8 +171,15 @@ Item { id: avatar anchors.centerIn: parent - height: Math.min(parent.width / 2, parent.height / 2) - width: Math.min(parent.width / 2, parent.height / 2) + + property real size: Math.min(parent.width / 2, parent.height / 2) + height: size + width: size + + // round the avatar source size up to some nearest multiple + readonly property real step: 96 + property real imageSize: Math.floor((size + step - 1) / step) * step + sourceSize: Qt.size(imageSize, imageSize) visible: false showPresenceIndicator: false