Some appearance tweaks

This commit is contained in:
James Magahern
2021-06-14 16:32:51 -07:00
parent ecee3bd9bb
commit d959342180
5 changed files with 46 additions and 18 deletions

View File

@@ -6,6 +6,7 @@
//
import UIKit
import QuartzCore_Private
class TitlebarView: UIView
{
@@ -15,10 +16,16 @@ class TitlebarView: UIView
UIColor(red: 0.153, green: 0.000, blue: 0.153, alpha: 1.0)
])
private let separatorView = UIView(frame: .zero)
convenience init() {
self.init(frame: .zero)
addSubview(backgroundView)
addSubview(titleLabelView)
addSubview(separatorView)
separatorView.backgroundColor = UIColor(white: 1.0, alpha: 0.20)
separatorView.layer.compositingFilter = kCAFilterPlusL
titleLabelView.textColor = .white
titleLabelView.layer.shadowColor = UIColor.black.cgColor
@@ -61,5 +68,8 @@ class TitlebarView: UIView
backgroundView.frame = bounds
titleLabelView.frame = bounds.avoiding(verticalInsets: safeAreaInsets).insetBy(dx: 8.0 + layoutMargins.left, dy: 0.0)
let separatorHeight = 1.0 / UIScreen.main.scale
separatorView.frame = CGRect(x: 0, y: bounds.height - separatorHeight, width: bounds.width, height: separatorHeight)
}
}