Show SSL status in titlebar

This commit is contained in:
James Magahern
2021-06-14 18:09:33 -07:00
parent 6ae053ab67
commit c60df21c54
3 changed files with 106 additions and 5 deletions

View File

@@ -23,16 +23,24 @@ extension CGRect
return rect
}
public func subtracting(width: CGFloat, height: CGFloat) -> CGRect {
var rect = self
rect.size.width -= width
rect.size.height -= height
return rect
}
public func centeredY(inRect: CGRect) -> CGRect {
var rect = self
rect.origin.y = CGRound((inRect.height - rect.height) / 2.0)
rect.origin.y = CGRound(inRect.origin.y + (inRect.height - rect.height) / 2.0)
return rect
}
public func centeredX(inRect: CGRect) -> CGRect {
var rect = self
rect.origin.x = CGRound((inRect.width - rect.width) / 2.0)
rect.origin.x = CGRound(inRect.origin.x + (inRect.width - rect.width) / 2.0)
return rect
}