From fe87d45221d9efd1cc2b32b72975bf6d15500cde Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 30 Sep 2014 11:32:57 -0700 Subject: [PATCH] fixed os x photos display --- Telegram/SourceFiles/history.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index b3d4480407..fc470dc515 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -1942,11 +1942,11 @@ void HistoryPhoto::draw(QPainter &p, const HistoryItem *parent, bool selected, i } else { pix = data->thumb->pixBlurred(width); } - if (pix.height() >= _height) { - p.drawPixmap(QPoint(0, 0), pix, QRect(0, (pix.height() - _height) / 2, width, _height)); + if (pix.height() >= _height * cIntRetinaFactor()) { + p.drawPixmap(QPoint(0, 0), pix, QRect(0, (pix.height() - _height * cIntRetinaFactor()) / 2, width * cIntRetinaFactor(), _height * cIntRetinaFactor())); } else { - int32 usewidth = (width * pix.height()) / _height; - p.drawPixmap(QRect(0, 0, width, _height), pix, QRect((width - usewidth) / 2, 0, usewidth, pix.height())); + int32 usewidth = (width * pix.height()) / (_height * cIntRetinaFactor()); + p.drawPixmap(QRect(0, 0, width, _height), pix, QRect((width - usewidth) * cIntRetinaFactor() / 2, 0, usewidth * cIntRetinaFactor(), pix.height())); } if (!full) { uint64 dt = itemAnimations().animate(parent, getms());