ScriptControllerIconView: Update to reflect policy type
This commit is contained in:
@@ -125,11 +125,13 @@ class ReliefButton: UIButton
|
||||
|
||||
override func imageRect(forContentRect contentRect: CGRect) -> CGRect {
|
||||
let ratio = CGFloat(0.45)
|
||||
let constantSize = round(ratio * contentRect.width)
|
||||
return CGRect(
|
||||
origin: .zero,
|
||||
size: CGSize(
|
||||
width: ratio * contentRect.width,
|
||||
height: ratio * contentRect.width
|
||||
// Ensure multiple of two for proper centering.
|
||||
width: constantSize + constantSize.truncatingRemainder(dividingBy: 2),
|
||||
height: constantSize + constantSize.truncatingRemainder(dividingBy: 2)
|
||||
)
|
||||
).centered(inRect: contentRect)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user