diff options
author | Ezekiel Smith <ezekielsmith@protonmail.com> | 2022-07-03 01:49:09 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-03 01:49:09 +1000 |
commit | 7aba7b60641c74ead1f57c3ebe6a56c93dd4d5d1 (patch) | |
tree | e1201cd3263d56908f48fbcebe69014b7847b13a /launcher/ui/pages/modplatform/ModModel.cpp | |
parent | e32030f364f71c8300ff25a33562c987e288440d (diff) | |
parent | a135c06bcfb70da4a74d1ba671f8dff04e199dc5 (diff) | |
download | PrismLauncher-7aba7b60641c74ead1f57c3ebe6a56c93dd4d5d1.tar.gz PrismLauncher-7aba7b60641c74ead1f57c3ebe6a56c93dd4d5d1.tar.bz2 PrismLauncher-7aba7b60641c74ead1f57c3ebe6a56c93dd4d5d1.zip |
Merge pull request #818 from flowln/tiny_mod_icons
Always scale mod icons to the right size
Diffstat (limited to 'launcher/ui/pages/modplatform/ModModel.cpp')
-rw-r--r-- | launcher/ui/pages/modplatform/ModModel.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/launcher/ui/pages/modplatform/ModModel.cpp b/launcher/ui/pages/modplatform/ModModel.cpp index 98eec31c..4917b890 100644 --- a/launcher/ui/pages/modplatform/ModModel.cpp +++ b/launcher/ui/pages/modplatform/ModModel.cpp @@ -53,7 +53,11 @@ auto ListModel::data(const QModelIndex& index, int role) const -> QVariant } case Qt::DecorationRole: { if (m_logoMap.contains(pack.logoName)) { - return (m_logoMap.value(pack.logoName)); + auto icon = m_logoMap.value(pack.logoName); + // FIXME: This doesn't really belong here, but Qt doesn't offer a good way right now ;( + auto icon_scaled = QIcon(icon.pixmap(48, 48).scaledToWidth(48)); + + return icon_scaled; } QIcon icon = APPLICATION->getThemedIcon("screenshot-placeholder"); // un-const-ify this |