From 03357d3ce78057e4da48a71cfc65578d599c69a2 Mon Sep 17 00:00:00 2001 From: "Evgeny @ SimpleX Chat" <259188159+evgeny-simplex@users.noreply.github.com> Date: Fri, 12 Jun 2026 06:16:33 +0000 Subject: [PATCH] position --- .../chat/simplex/common/views/helpers/ChatInfoImage.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/ChatInfoImage.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/ChatInfoImage.kt index b8d4510bae..f08fa39eec 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/ChatInfoImage.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/ChatInfoImage.kt @@ -97,11 +97,12 @@ fun ProfileImage( val insetPx = inset.roundToPx() layout(avatar.width, avatar.height) { avatar.place(0, 0) - // badgeInsideShare of the badge is inside the visible avatar (the box minus its inset), - // the rest overhangs the avatar's bottom-right edge + // badgeInsideShare of the badge width is inside the visible avatar (the box minus its inset); + // the badge overhangs the avatar's bottom-right edge by the same amount on both axes + val overhang = ((1 - badgeInsideShare) * bdg.width).roundToInt() bdg.place( - x = avatar.width - insetPx - (badgeInsideShare * bdg.width).roundToInt(), - y = avatar.height - insetPx - (badgeInsideShare * bdg.height).roundToInt() + x = avatar.width - insetPx - bdg.width + overhang, + y = avatar.height - insetPx - bdg.height + overhang ) } }