2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 23:45:44 +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

@@ -1479,9 +1479,9 @@ void Widget::startWidthAnimation() {
_inner->setNarrowRatio(0.);
Ui::SendPendingMoveResizeEvents(_scroll);
auto image = QImage(
grabGeometry.size() * cIntRetinaFactor(),
grabGeometry.size() * style::DevicePixelRatio(),
QImage::Format_ARGB32_Premultiplied);
image.setDevicePixelRatio(cRetinaFactor());
image.setDevicePixelRatio(style::DevicePixelRatio());
image.fill(Qt::transparent);
{
QPainter p(&image);
@@ -3097,7 +3097,8 @@ void Widget::paintEvent(QPaintEvent *e) {
auto belowTop = _scroll->y() + _scroll->height();
if (!_widthAnimationCache.isNull()) {
p.drawPixmapLeft(0, _scroll->y(), width(), _widthAnimationCache);
belowTop = _scroll->y() + (_widthAnimationCache.height() / cIntRetinaFactor());
belowTop = _scroll->y()
+ (_widthAnimationCache.height() / style::DevicePixelRatio());
}
auto below = QRect(0, belowTop, width(), height() - belowTop);