Show SSL status in titlebar
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user