Some appearance tweaks
This commit is contained in:
@@ -14,7 +14,7 @@ class ToolbarView: UIView
|
||||
var cancelButtonVisible: Bool = false { didSet { layoutSubviews() } }
|
||||
|
||||
let containerView = UIView(frame: .zero)
|
||||
let backgroundView = UIVisualEffectView(effect: UIBlurEffect(style: .systemThickMaterial))
|
||||
let backgroundView = GradientView(direction: .vertical, colors: [.tertiarySystemGroupedBackground, .secondarySystemGroupedBackground])
|
||||
let cancelButton = UIButton(type: .system)
|
||||
|
||||
let leadingButtonsView = ToolbarButtonContainerView(frame: .zero)
|
||||
@@ -95,11 +95,16 @@ class ToolbarView: UIView
|
||||
}
|
||||
|
||||
if let urlBar = urlBar {
|
||||
let origin = CGPoint(
|
||||
var origin = CGPoint(
|
||||
x: leadingButtonsView.frame.maxX,
|
||||
y: 0.0
|
||||
)
|
||||
|
||||
if origin.x == 0 {
|
||||
// Add some padding if url bar is flush with side
|
||||
origin.x = layoutMargins.left
|
||||
}
|
||||
|
||||
urlBar.frame = CGRect(
|
||||
origin: origin,
|
||||
size: CGSize(
|
||||
@@ -108,7 +113,7 @@ class ToolbarView: UIView
|
||||
)
|
||||
)
|
||||
|
||||
urlBar.frame = urlBar.frame.inset(by: urlBarInsets)
|
||||
urlBar.frame = urlBar.frame.inset(by: urlBarInsets).inset(by: buttonContainerInset)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user