Font size adjustment
This commit is contained in:
@@ -12,6 +12,7 @@ class URLBar: ReliefButton
|
||||
let textField = UITextField(frame: .zero)
|
||||
let refreshButton = UIButton(frame: .zero)
|
||||
let errorButton = UIButton(frame: .zero)
|
||||
let documentButton = UIButton(frame: .zero)
|
||||
|
||||
public enum LoadProgress {
|
||||
case complete
|
||||
@@ -28,11 +29,14 @@ class URLBar: ReliefButton
|
||||
private let progressIndicatorView = ProgressIndicatorView()
|
||||
private var progressIndicatorAnimating = false
|
||||
|
||||
private let documentImage = UIImage(systemName: "doc.plaintext")
|
||||
private let refreshImage = UIImage(systemName: "arrow.clockwise")
|
||||
private let stopImage = UIImage(systemName: "xmark")
|
||||
|
||||
private let backgroundCornerRadius: CGFloat = 0
|
||||
|
||||
private let documentSeparatorView = UIView(frame: .zero)
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
|
||||
@@ -70,6 +74,13 @@ class URLBar: ReliefButton
|
||||
errorButton.setTitle("ERR", for: .normal)
|
||||
addSubview(errorButton)
|
||||
|
||||
documentButton.tintColor = .secondaryLabel
|
||||
documentButton.setImage(documentImage, for: .normal)
|
||||
addSubview(documentButton)
|
||||
|
||||
documentSeparatorView.backgroundColor = .secondarySystemFill
|
||||
addSubview(documentSeparatorView)
|
||||
|
||||
setErrorButtonAnimating(false)
|
||||
}
|
||||
|
||||
@@ -172,7 +183,27 @@ class URLBar: ReliefButton
|
||||
backgroundView.frame = bounds
|
||||
shadowView.frame = bounds
|
||||
progressIndicatorView.frame = backgroundView.bounds
|
||||
textField.frame = bounds.insetBy(dx: 6.0, dy: 0)
|
||||
|
||||
// Document button
|
||||
documentButton.frame = CGRect(x: 0.0, y: 0.0, width: bounds.height, height: bounds.height)
|
||||
|
||||
// Document separator
|
||||
documentSeparatorView.frame = CGRect(
|
||||
x: documentButton.frame.maxX, y: 0.0,
|
||||
width: 1.0, height: bounds.height
|
||||
)
|
||||
documentSeparatorView.frame = documentSeparatorView.frame.insetBy(dx: 0.0, dy: 3.0)
|
||||
|
||||
// Text field
|
||||
let textFieldPadding: CGFloat = 5.0
|
||||
let textFieldOrigin = CGPoint(x: documentButton.frame.maxX + textFieldPadding, y: 0.0)
|
||||
textField.frame = CGRect(
|
||||
origin: textFieldOrigin,
|
||||
size: CGSize(
|
||||
width: bounds.width - textFieldOrigin.x - textFieldPadding,
|
||||
height: bounds.height
|
||||
)
|
||||
)
|
||||
|
||||
var fadeCutoffLocation: CGFloat = 0.8
|
||||
|
||||
|
||||
Reference in New Issue
Block a user