From 1b85f6532b38cc099cd93434a4a63bf65675a41c Mon Sep 17 00:00:00 2001 From: Magesh K <47920326+mahee96@users.noreply.github.com> Date: Tue, 17 Dec 2024 06:02:07 +0530 Subject: [PATCH] [icons]: Fix for minicon in the Change App Icon screen --- AltStore/Settings/AltAppIconsViewController.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/AltStore/Settings/AltAppIconsViewController.swift b/AltStore/Settings/AltAppIconsViewController.swift index 3a553870..d3e7fa07 100644 --- a/AltStore/Settings/AltAppIconsViewController.swift +++ b/AltStore/Settings/AltAppIconsViewController.swift @@ -145,9 +145,14 @@ private extension AltAppIconsViewController config.text = icon.name config.textProperties.font = font config.textProperties.color = .label + + // we have to do this hardcodded name hack for .appiconset + // else one can supply the artifacts via .imageset + let image: UIImage? = + UIImage(named: icon.imageName) ?? + UIImage(named: "\(icon.imageName)76x76@2x~ipad") ?? + UIImage(named: "\(icon.imageName)60x60@2x") - let image = UIImage(named: icon.imageName) -// let image = UIImage(systemName: "bag") config.image = image config.imageProperties.maximumSize = CGSize(width: imageWidth, height: imageWidth) config.imageProperties.cornerRadius = imageWidth / 5.0 // Copied from AppIconImageView