Appearance tweaks
This commit is contained in:
@@ -118,9 +118,7 @@ class TitlebarView: UIView
|
||||
|
||||
let edgePadding: CGFloat = 8.0
|
||||
|
||||
// Thought it would be cool to have a different style for regular, but eh.
|
||||
let securityLabelOnTrailingSide = false // (traitCollection.horizontalSizeClass == .regular)
|
||||
securityIndicatorView.labelVisible = securityLabelOnTrailingSide
|
||||
securityIndicatorView.labelVisible = false
|
||||
|
||||
var securityIndicatorSize = showsSecurityIndicator ? securityIndicatorView.sizeThatFits(bounds.size) : .zero
|
||||
securityIndicatorSize.height = 10.0
|
||||
@@ -133,23 +131,14 @@ class TitlebarView: UIView
|
||||
|
||||
if showsSecurityIndicator {
|
||||
securityIndicatorView.isHidden = false
|
||||
securityIndicatorView.frame = CGRect(
|
||||
origin: CGPoint(x: edgePadding + layoutMargins.left, y: 0.0),
|
||||
size: CGSize(width: securityIndicatorSize.height, height: securityIndicatorSize.height)
|
||||
)
|
||||
|
||||
if !securityLabelOnTrailingSide {
|
||||
securityIndicatorView.frame = CGRect(
|
||||
origin: CGPoint(x: edgePadding + layoutMargins.left, y: 0.0),
|
||||
size: CGSize(width: securityIndicatorSize.height, height: securityIndicatorSize.height)
|
||||
)
|
||||
|
||||
// Scooch the title over a bit
|
||||
titleLabelView.frame.origin.x = securityIndicatorView.frame.maxX + 4.0
|
||||
} else {
|
||||
securityIndicatorView.frame = CGRect(
|
||||
x: bounds.width - layoutMargins.right - securityIndicatorSize.width, y: 0.0,
|
||||
width: securityIndicatorSize.width,
|
||||
height: securityIndicatorSize.height
|
||||
)
|
||||
}
|
||||
|
||||
// Scooch the title over a bit
|
||||
titleLabelView.frame.origin.x = securityIndicatorView.frame.maxX + 4.0
|
||||
|
||||
securityIndicatorView.frame = securityIndicatorView.frame.centeredY(inRect: titleLabelView.frame)
|
||||
} else {
|
||||
securityIndicatorView.isHidden = true
|
||||
|
||||
Reference in New Issue
Block a user