mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix reactions dropdown on Retina screen.
This commit is contained in:
parent
8659f60b46
commit
e0fd5d8795
1 changed files with 6 additions and 3 deletions
|
@ -755,7 +755,7 @@ void Manager::paintButton(
|
||||||
p.drawImage(
|
p.drawImage(
|
||||||
geometry,
|
geometry,
|
||||||
_expandedBuffer,
|
_expandedBuffer,
|
||||||
QRect(QPoint(), size / style::DevicePixelRatio()));
|
QRect(QPoint(), size * style::DevicePixelRatio()));
|
||||||
}
|
}
|
||||||
if (opacity != 1.) {
|
if (opacity != 1.) {
|
||||||
p.setOpacity(1.);
|
p.setOpacity(1.);
|
||||||
|
@ -776,9 +776,11 @@ void Manager::overlayExpandedBorder(
|
||||||
const auto maskSize = QRect(0, 0, maxSide, minHeight).marginsAdded(
|
const auto maskSize = QRect(0, 0, maxSide, minHeight).marginsAdded(
|
||||||
st::reactionCornerShadow
|
st::reactionCornerShadow
|
||||||
).size();
|
).size();
|
||||||
|
const auto ratio = style::DevicePixelRatio();
|
||||||
auto mask = QImage(
|
auto mask = QImage(
|
||||||
maskSize * style::DevicePixelRatio(),
|
maskSize * ratio,
|
||||||
QImage::Format_ARGB32_Premultiplied);
|
QImage::Format_ARGB32_Premultiplied);
|
||||||
|
mask.setDevicePixelRatio(ratio);
|
||||||
mask.fill(Qt::transparent);
|
mask.fill(Qt::transparent);
|
||||||
{
|
{
|
||||||
auto q = Painter(&mask);
|
auto q = Painter(&mask);
|
||||||
|
@ -796,8 +798,9 @@ void Manager::overlayExpandedBorder(
|
||||||
}
|
}
|
||||||
|
|
||||||
auto shadowMask = QImage(
|
auto shadowMask = QImage(
|
||||||
maskSize * style::DevicePixelRatio(),
|
maskSize * ratio,
|
||||||
QImage::Format_ARGB32_Premultiplied);
|
QImage::Format_ARGB32_Premultiplied);
|
||||||
|
shadowMask.setDevicePixelRatio(ratio);
|
||||||
shadowMask.fill(Qt::transparent);
|
shadowMask.fill(Qt::transparent);
|
||||||
{
|
{
|
||||||
auto q = Painter(&shadowMask);
|
auto q = Painter(&shadowMask);
|
||||||
|
|
Loading…
Add table
Reference in a new issue