Merge pull request #13126 from jordan-woyak/no-big-banner

DolphinQt: Restrict size of banner image in game properties info tab.
This commit is contained in:
Tilka
2024-10-12 09:40:20 +01:00
committed by GitHub
3 changed files with 9 additions and 5 deletions

View File

@ -18,6 +18,7 @@
#include "DiscIO/Blob.h"
#include "DiscIO/Enums.h"
#include "DiscIO/Volume.h"
#include "DiscIO/WiiSaveBanner.h"
#include "DolphinQt/QtUtils/DolphinFileDialog.h"
#include "DolphinQt/QtUtils/ImageConverter.h"
@ -179,7 +180,9 @@ QWidget* InfoWidget::CreateBannerGraphic(const QPixmap& image)
QHBoxLayout* layout = new QHBoxLayout();
QLabel* banner = new QLabel();
banner->setPixmap(image);
banner->setPixmap(image.scaled(image.size().boundedTo(
QSize{DiscIO::WiiSaveBanner::BANNER_WIDTH, DiscIO::WiiSaveBanner::BANNER_HEIGHT})));
QPushButton* save = new QPushButton(tr("Save as..."));
connect(save, &QPushButton::clicked, this, &InfoWidget::SaveBanner);