Qt: Allow transparent padding for covers

Need to use a custom paint delegate instead...
pull/3569/head
Stenzek 2 months ago
parent bb50fc9056
commit 9a1a8c226a
No known key found for this signature in database

@ -118,7 +118,8 @@ static void resizeAndPadImage(QImage* image, int expected_width, int expected_he
if ((image_height < dpr_expected_height) != expand_to_fill)
yoffs = static_cast<int>(static_cast<qreal>((dpr_expected_height - image_height) / 2) / dpr);
QImage padded_image(dpr_expected_width, dpr_expected_height, expected_format);
QImage padded_image(dpr_expected_width, dpr_expected_height,
fill_with_top_left ? expected_format : QImage::Format_ARGB32_Premultiplied);
padded_image.setDevicePixelRatio(dpr);
if (fill_with_top_left)
padded_image.fill(image->pixel(0, 0));

Loading…
Cancel
Save