mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix temporary reaction selector on Retina screens.
This commit is contained in:
parent
a550b73e2c
commit
6f2bb43505
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue