Some appearance tweaks
This commit is contained in:
@@ -14,7 +14,16 @@ class ToolbarView: UIView
|
||||
var cancelButtonVisible: Bool = false { didSet { layoutSubviews() } }
|
||||
|
||||
let containerView = UIView(frame: .zero)
|
||||
let backgroundView = GradientView(direction: .vertical, colors: [.tertiarySystemGroupedBackground, .secondarySystemGroupedBackground])
|
||||
let backgroundView = GradientView(direction: .vertical, colors: [
|
||||
.init(dynamicProvider: { traits in
|
||||
if traits.userInterfaceStyle == .dark {
|
||||
return UIColor(white: 0.15, alpha: 1.0)
|
||||
} else {
|
||||
return UIColor.tertiarySystemGroupedBackground
|
||||
}
|
||||
}),
|
||||
.secondarySystemGroupedBackground
|
||||
])
|
||||
let cancelButton = UIButton(type: .system)
|
||||
|
||||
let leadingButtonsView = ToolbarButtonContainerView(frame: .zero)
|
||||
@@ -34,9 +43,9 @@ class ToolbarView: UIView
|
||||
|
||||
layer.masksToBounds = false
|
||||
layer.shadowColor = UIColor.black.cgColor
|
||||
layer.shadowOpacity = 0.2
|
||||
layer.shadowOpacity = 0.3
|
||||
layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
|
||||
layer.shadowRadius = 1.5
|
||||
layer.shadowRadius = 1.8
|
||||
}
|
||||
|
||||
override func sizeThatFits(_ size: CGSize) -> CGSize
|
||||
|
||||
Reference in New Issue
Block a user