diff --git a/src/commoncomponents/Avatar.qml b/src/commoncomponents/Avatar.qml index bb6662b758583e322a6bcbda50caf5b913ef28ba..45e66fbb98d09bbd71c35a43d0b6000a2b9f854a 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 a223b417865b1cbe90f87eedef71470db463af84..c7ebb70b78ae2a7422ee76bebb23583dee1be99d 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