DolphinQt: Restrict size of banner image in game properties info tab.

This commit is contained in:
Jordan Woyak
2024-10-11 22:56:33 -05:00
parent d6e10e586a
commit 23ba1c9133
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);