Fix scaling of the avatar in UserInfo

This commit is contained in:
Michael Telatynski 2019-12-19 12:27:25 +00:00
parent 3196655524
commit 66783dff9e
3 changed files with 31 additions and 18 deletions

View file

@ -1156,14 +1156,16 @@ const UserInfo = withLegacyMatrixClient(({matrixClient: cli, user, groupId, room
const avatarElement = (
<div className="mx_UserInfo_avatar">
<div>
<MemberAvatar
member={user}
width={0.3 * window.outerHeight} // ~30vh
height={0.3 * window.outerHeight} // ~30vh
resizeMethod="scale"
fallbackUserId={user.userId}
onClick={onMemberAvatarClick}
urls={user.avatarUrl ? [user.avatarUrl] : undefined} />
<div>
<MemberAvatar
member={user}
width={2 * 0.3 * window.innerHeight} // 2x@30vh
height={2 * 0.3 * window.innerHeight} // 2x@30vh
resizeMethod="scale"
fallbackUserId={user.userId}
onClick={onMemberAvatarClick}
urls={user.avatarUrl ? [user.avatarUrl] : undefined} />
</div>
</div>
</div>
);