Some fixes for macOS
This commit is contained in:
@@ -20,7 +20,6 @@ class ReliefButton: UIButton
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
init() {
|
||||
super.init(frame: .zero)
|
||||
|
||||
@@ -105,8 +104,14 @@ class ReliefButton: UIButton
|
||||
}
|
||||
|
||||
override func imageRect(forContentRect contentRect: CGRect) -> CGRect {
|
||||
let inset = CGFloat(7.0)
|
||||
return contentRect.insetBy(dx: inset, dy: inset)
|
||||
let ratio = CGFloat(0.45)
|
||||
return CGRect(
|
||||
origin: .zero,
|
||||
size: CGSize(
|
||||
width: ratio * contentRect.width,
|
||||
height: ratio * contentRect.width
|
||||
)
|
||||
).centered(inRect: contentRect)
|
||||
}
|
||||
|
||||
override func sizeThatFits(_ size: CGSize) -> CGSize {
|
||||
|
||||
Reference in New Issue
Block a user