Fix temporary reaction selector on Retina screens.

This commit is contained in:
John Preston 2021-12-21 15:10:33 +00:00
parent a550b73e2c
commit 6f2bb43505

View file

@ -232,7 +232,8 @@ Selector::Selector(
const auto activeIndex = (state->pressed >= 0) const auto activeIndex = (state->pressed >= 0)
? state->pressed ? state->pressed
: state->selected; : state->selected;
const auto size = Ui::Emoji::GetSizeNormal(); const auto realSize = Ui::Emoji::GetSizeNormal();
const auto size = realSize / style::DevicePixelRatio();
for (const auto &element : _elements) { for (const auto &element : _elements) {
const auto active = (index++ == activeIndex); const auto active = (index++ == activeIndex);
if (active) { if (active) {
@ -245,7 +246,7 @@ Selector::Selector(
Ui::Emoji::Draw( Ui::Emoji::Draw(
p, p,
emoji, emoji,
size, realSize,
element.geometry.x() + (width - size) / 2, element.geometry.x() + (width - size) / 2,
element.geometry.y() + (height - size) / 2); element.geometry.y() + (height - size) / 2);
} }