From 78bd0fdf3e4c2484c6180763e05d4590ec1039de Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 17 Feb 2025 22:32:33 +1000 Subject: [PATCH] Qt: Always use ARGB32 for padded cover images Fixes black background around non-square covers. --- src/duckstation-qt/gamelistmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/duckstation-qt/gamelistmodel.cpp b/src/duckstation-qt/gamelistmodel.cpp index 76b8995cf..96fcfef36 100644 --- a/src/duckstation-qt/gamelistmodel.cpp +++ b/src/duckstation-qt/gamelistmodel.cpp @@ -51,7 +51,7 @@ static void resizeAndPadImage(QImage* image, int expected_width, int expected_he if (image->height() < dpr_expected_height) yoffs = static_cast(static_cast((dpr_expected_height - image->height()) / 2) / dpr); - QImage padded_image(dpr_expected_width, dpr_expected_height, image->format()); + QImage padded_image(dpr_expected_width, dpr_expected_height, QImage::Format_ARGB32); padded_image.setDevicePixelRatio(dpr); padded_image.fill(Qt::transparent); QPainter painter;