Pointer effects

This commit is contained in:
James Magahern
2021-04-19 17:55:24 -07:00
parent 6eb462aeb7
commit 428232bfa8
5 changed files with 28 additions and 1 deletions

View File

@@ -40,6 +40,10 @@ class URLBar: ReliefButton
didSet { updateProgressIndicator() }
}
override var isPointerInteractionEnabled: Bool {
get { false } set {}
}
private let fadeMaskView = UIImageView(frame: .zero)
private let progressIndicatorView = ProgressIndicatorView()
@@ -84,6 +88,7 @@ class URLBar: ReliefButton
refreshButton.tintColor = .secondaryLabel
refreshButton.setImage(refreshImage, for: .normal)
refreshButton.isPointerInteractionEnabled = true
addSubview(refreshButton)
errorButton.backgroundColor = .systemRed
@@ -92,10 +97,12 @@ class URLBar: ReliefButton
errorButton.titleLabel?.font = UIFont.boldSystemFont(ofSize: 11.0)
errorButton.setTitleColor(.white, for: .normal)
errorButton.setTitle("ERR", for: .normal)
errorButton.isPointerInteractionEnabled = true
addSubview(errorButton)
documentButton.tintColor = .secondaryLabel
documentButton.setImage(documentImage, for: .normal)
documentButton.isPointerInteractionEnabled = true
addSubview(documentButton)
documentSeparatorView.backgroundColor = .secondarySystemFill
@@ -155,6 +162,10 @@ class URLBar: ReliefButton
self.setNeedsLayout()
}
override func setBackgroundInverted(_ inverted: Bool) {
// no-op
}
override var intrinsicContentSize: CGSize {
let preferredHeight = CGFloat(34)
return CGSize(width: 1000.0, height: preferredHeight)