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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user