Fix reaction icons in Who Reacted.

This commit is contained in:
John Preston 2022-09-12 09:38:18 +04:00
parent e2bca0a7ff
commit 7c8d3452b5
2 changed files with 4 additions and 3 deletions

View file

@ -850,7 +850,8 @@ Ui::Text::CustomEmojiFactory ReactedMenuFactory(
: i->selectAnimation;
const auto size = st::emojiSize * (i->centerIcon ? 2 : 1);
const auto tag = Data::CustomEmojiManager::SizeTag::Normal;
const auto skip = (Data::FrameSizeFromTag(tag) - size) / 2;
const auto ratio = style::DevicePixelRatio();
const auto skip = (Data::FrameSizeFromTag(tag) / ratio - size) / 2;
return std::make_unique<Ui::Text::FirstFrameEmoji>(
std::make_unique<Ui::Text::ShiftedEmoji>(
owner->customEmojiManager().create(

View file

@ -107,8 +107,8 @@ not_null<Ui::AbstractButton*> CreateTab(
p.drawImage(0, 0, state->cache);
if (const auto custom = state->custom.get()) {
using namespace Ui::Text;
const auto size = Ui::Emoji::GetSizeNormal();
const auto shift = (height - (size / factor)) / 2;
const auto size = Ui::Emoji::GetSizeNormal() / factor;
const auto shift = (height - size) / 2;
const auto skip = (size - AdjustCustomEmojiSize(size)) / 2;
custom->paint(p, {
.preview = (state->selected