Fix round corners on Retina displays.

This commit is contained in:
John Preston 2017-12-27 13:08:18 +03:00
parent bd8dee0972
commit 95d8742e3c
1 changed files with 2 additions and 3 deletions

View File

@ -328,7 +328,6 @@ void AlbumThumb::prepareCache(QSize size, int shrink) {
_layout.geometry.height(),
_fromGeometry.height());
const auto cacheSize = QSize(width, height) * cIntRetinaFactor();
const auto initial = QRect(QPoint(), size);
if (_albumCache.width() < cacheSize.width()
|| _albumCache.height() < cacheSize.height()) {
@ -337,7 +336,7 @@ void AlbumThumb::prepareCache(QSize size, int shrink) {
_albumCache.fill(Qt::transparent);
{
Painter p(&_albumCache);
const auto to = initial.marginsRemoved(
const auto to = QRect(QPoint(), size).marginsRemoved(
{ shrink, shrink, shrink, shrink }
);
drawSimpleFrame(p, to, size);
@ -346,7 +345,7 @@ void AlbumThumb::prepareCache(QSize size, int shrink) {
_albumCache,
ImageRoundRadius::Large,
_albumCorners,
initial);
QRect(QPoint(), size * cIntRetinaFactor()));
}
void AlbumThumb::drawSimpleFrame(Painter &p, QRect to, QSize size) const {