Allow a little bit of variance from square for compact layout
This commit is contained in:
parent
61a07e9a5b
commit
52f5213990
|
@ -184,9 +184,10 @@ private extension StatusCardControl {
|
|||
|
||||
private extension Card {
|
||||
var layout: StatusCardControl.Layout {
|
||||
return width == height || image == nil
|
||||
let aspectRatio = CGFloat(width) / CGFloat(height)
|
||||
return abs(aspectRatio - 1) < 0.05 || image == nil
|
||||
? .compact
|
||||
: .large(aspectRatio: CGFloat(width) / CGFloat(height))
|
||||
: .large(aspectRatio: aspectRatio)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue