diff --git a/src/model/danboorupostdelegate.cpp b/src/model/danboorupostdelegate.cpp index 27107fc..3f74e3f 100644 --- a/src/model/danboorupostdelegate.cpp +++ b/src/model/danboorupostdelegate.cpp @@ -118,21 +118,18 @@ namespace Danbooru { // Scaling is unavoidable to keep things in the right dimension - QPixmap scaled = pixmap.scaled(rect.width() - MARGIN, - rect.height() - MARGIN, + QPixmap scaled = pixmap.scaled(rect.width() - MARGIN, rect.height() - MARGIN, Qt::KeepAspectRatio, Qt::SmoothTransformation); QRect pixRect = scaled.rect(); pixRect.moveCenter(rect.center()); -// painter->drawRect(option.rect); - // move the pixmap up to accomodate some lines of text pixRect.moveTo(pixRect.left(), - pixRect.top() + textRect.height() / 2); - pixRect.setBottom(textRect.top() - MARGIN); + pixRect.top() - textRect.height() / 2); + pixRect.moveBottom(textRect.top() - MARGIN); painter->drawPixmap(pixRect, scaled); painter->restore(); @@ -232,8 +229,6 @@ namespace Danbooru { if (post) { Q_EMIT(postDownloadRequested(post->fileUrl())); } - - } void DanbooruPostDelegate::viewButtonClicked()