mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02: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