mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix repainting of custom emoji in notifications.
This commit is contained in:
parent
8a9549dca3
commit
fce4452af5
1 changed files with 4 additions and 1 deletions
|
@ -771,7 +771,10 @@ void Notification::repaintText() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Painter p(&_cache);
|
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);
|
paintText(p);
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue