Pointer effects
This commit is contained in:
@@ -14,6 +14,10 @@ class ToolbarButtonContainerView: UIView
|
||||
public var numberOfButtonViews: Int { buttonViews.count }
|
||||
|
||||
func addButtonView(_ button: UIView) {
|
||||
if let asButton = button as? UIButton {
|
||||
asButton.isPointerInteractionEnabled = true
|
||||
}
|
||||
|
||||
buttonViews.append(button)
|
||||
addSubview(button)
|
||||
setNeedsLayout()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user