From dd79d089f6aab2094a72dd5e2d4e3a5dfa66c02f Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 25 Mar 2019 23:33:58 +0100 Subject: [PATCH] Tweak the size a bit --- src/playlist/playlistview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/playlist/playlistview.cpp b/src/playlist/playlistview.cpp index 7cdec1a87..9a3c20c4e 100644 --- a/src/playlist/playlistview.cpp +++ b/src/playlist/playlistview.cpp @@ -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)); } }