[icons]: Fix for minicon in the Change App Icon screen

This commit is contained in:
Magesh K
2024-12-17 06:02:07 +05:30
parent f080379994
commit 1b85f6532b

View File

@@ -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