Chat wallpaper fixes

This commit is contained in:
Ilya Laktyushin
2023-04-13 15:19:38 +04:00
parent 0ca302e947
commit bd782b0402
5 changed files with 50 additions and 17 deletions

View File

@@ -239,7 +239,7 @@ public final class TextNodeWithEntities {
let id = InlineStickerItemLayer.Key(id: stickerItem.emoji.fileId, index: index)
validIds.append(id)
let itemSize = floor(stickerItem.fontSize * 24.0 / 17.0)
let itemSize = floorToScreenPixels(stickerItem.fontSize * 24.0 / 17.0)
var itemFrame = CGRect(origin: item.rect.offsetBy(dx: textLayout.insets.left, dy: textLayout.insets.top + 1.0).center, size: CGSize()).insetBy(dx: -itemSize / 2.0, dy: -itemSize / 2.0)
itemFrame.origin.x = floorToScreenPixels(itemFrame.origin.x)