Don't scale up icons anymore. It was causing a weird effect where in some visible views the source icon was larger than in other.

This commit is contained in:
Maurice Parker
2020-07-21 18:25:54 -05:00
parent 9d4f34bb7c
commit f7dec4cf23
3 changed files with 1 additions and 13 deletions

View File

@@ -100,10 +100,6 @@ private extension IconView {
let imageSize = image.size
let viewSize = bounds.size
if imageSize.height == imageSize.width {
if imageSize.height >= viewSize.height * 0.75 {
// Close enough to viewSize to scale up the image.
return CGRect(x: 0.0, y: 0.0, width: viewSize.width, height: viewSize.height)
}
let offset = floor((viewSize.height - imageSize.height) / 2.0)
return CGRect(x: offset, y: offset, width: imageSize.width, height: imageSize.height)
}