Fix topic profile icon on Retina screen (again).

This commit is contained in:
John Preston 2022-11-02 17:21:05 +04:00
parent 34a2c5c8ce
commit fdb29a756a

View file

@ -131,8 +131,11 @@ void TopicIconView::paintInRect(QPainter &p, QRect rect) {
const auto paint = [&](const QImage &image) { const auto paint = [&](const QImage &image) {
const auto size = image.size() / style::DevicePixelRatio(); const auto size = image.size() / style::DevicePixelRatio();
p.drawImage( p.drawImage(
rect.x() + (rect.width() - size.width()) / 2, QRect(
rect.y() + (rect.height() - size.height()) / 2, rect.x() + (rect.width() - size.width()) / 2,
rect.y() + (rect.height() - size.height()) / 2,
size.width(),
size.height()),
image); image);
}; };
if (_player && _player->ready()) { if (_player && _player->ready()) {