2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 07:25:46 +00:00

Removed cIntRetinaFactor and cRetinaFactor.

This commit is contained in:
23rd
2024-03-24 01:04:33 +03:00
parent 58fcedab64
commit d03d50ef0d
64 changed files with 411 additions and 270 deletions

View File

@@ -368,7 +368,11 @@ void TabbedPanel::startShowAnimation() {
? Ui::PanelAnimation::Origin::TopRight
: Ui::PanelAnimation::Origin::BottomRight));
auto inner = rect().marginsRemoved(st::emojiPanMargins);
_showAnimation->setFinalImage(std::move(image), QRect(inner.topLeft() * cIntRetinaFactor(), inner.size() * cIntRetinaFactor()));
_showAnimation->setFinalImage(
std::move(image),
QRect(
inner.topLeft() * style::DevicePixelRatio(),
inner.size() * style::DevicePixelRatio()));
_showAnimation->setCornerMasks(Images::CornersMask(st::emojiPanRadius));
_showAnimation->start();
}
@@ -386,9 +390,9 @@ QImage TabbedPanel::grabForAnimation() {
Ui::SendPendingMoveResizeEvents(this);
auto result = QImage(
size() * cIntRetinaFactor(),
size() * style::DevicePixelRatio(),
QImage::Format_ARGB32_Premultiplied);
result.setDevicePixelRatio(cRetinaFactor());
result.setDevicePixelRatio(style::DevicePixelRatio());
result.fill(Qt::transparent);
if (_selector) {
QPainter p(&result);