Beta version 5.8.5: Fix build with Xcode.

This commit is contained in:
John Preston 2024-11-29 11:25:29 +04:00
parent 61ceb66415
commit 96398daa78

View file

@ -29,14 +29,15 @@ QImage ChatsFilterTag(QString roundedText, QColor color, bool active) {
auto emojiLength = 0;
if (const auto emoji = Ui::Emoji::Find(ch, end, &emojiLength)) {
const auto factor = style::DevicePixelRatio();
emojiReplacements.emplace_back(
Ui::Emoji::SinglePixmap(
emojiReplacements.push_back({
.pixmap = Ui::Emoji::SinglePixmap(
emoji,
st::normalFont->height * factor).scaledToHeight(
roundedFont->ascent * factor,
Qt::SmoothTransformation),
ch - roundedText.constData(),
emojiLength);
.from = int(ch - roundedText.constData()),
.length = emojiLength,
});
ch += emojiLength;
} else {
ch++;