mirror of
https://github.com/stenzek/duckstation.git
synced 2025-12-28 05:24:19 +00:00
Qt: Allow transparent padding for covers
Some checks are pending
Automated Builds / 💻 Windows (push) Waiting to run
Automated Builds / 🐧 Linux AppImage (push) Waiting to run
Automated Builds / 🐧 Linux Cross-Compiled AppImage (push) Waiting to run
Automated Builds / 📦 Linux Flatpak (push) Blocked by required conditions
Automated Builds / 🍎 MacOS (push) Waiting to run
Automated Builds / 📤 Create Release (push) Blocked by required conditions
Some checks are pending
Automated Builds / 💻 Windows (push) Waiting to run
Automated Builds / 🐧 Linux AppImage (push) Waiting to run
Automated Builds / 🐧 Linux Cross-Compiled AppImage (push) Waiting to run
Automated Builds / 📦 Linux Flatpak (push) Blocked by required conditions
Automated Builds / 🍎 MacOS (push) Waiting to run
Automated Builds / 📤 Create Release (push) Blocked by required conditions
Need to use a custom paint delegate instead...
This commit is contained in:
parent
bb50fc9056
commit
9a1a8c226a
@ -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…
Reference in New Issue
Block a user