Tweak the size a bit

This commit is contained in:
Jonas Kvinge 2019-03-25 23:33:58 +01:00
parent 7aaad124d0
commit dd79d089f6
1 changed files with 2 additions and 2 deletions

View File

@ -804,8 +804,8 @@ void PlaylistView::paintEvent(QPaintEvent *event) {
}
}
else {
int resize_width = qMin(qMin(background_image_.size().width(), width()), background_image_maxsize_);
int resize_height = qMin(qMin(background_image_.size().height(), height()), background_image_maxsize_);
int resize_width = qMin(qMin(background_image_.size().width(), (width() >= 50 ? (width() - 25) : width())), background_image_maxsize_);
int resize_height = qMin(qMin(background_image_.size().height(), (height() >= 50 ? (height() - 25) : height())), background_image_maxsize_);
cached_scaled_background_image_ = QPixmap::fromImage(background_image_.scaled(resize_width, resize_height, Qt::KeepAspectRatio, Qt::SmoothTransformation));
}
}