2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Fix repainting of custom emoji in notifications.

This commit is contained in:
John Preston
2022-07-18 14:00:49 +03:00
parent 8a9549dca3
commit fce4452af5

View File

@@ -771,7 +771,10 @@ void Notification::repaintText() {
return;
}
Painter p(&_cache);
p.fillRect(_textRect, st::notificationBg);
const auto adjusted = Ui::Text::AdjustCustomEmojiSize(st::emojiSize);
const auto skip = (adjusted - st::emojiSize + 1) / 2;
const auto margin = QMargins{ skip, skip, skip, skip };
p.fillRect(_textRect.marginsAdded(margin), st::notificationBg);
paintText(p);
update();
}