Dark mode appearance tweaks
This commit is contained in:
@@ -15,13 +15,7 @@ class ToolbarView: UIView
|
||||
|
||||
let containerView = UIView(frame: .zero)
|
||||
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,
|
||||
.secondarySystemGroupedBackground
|
||||
])
|
||||
let cancelButton = UIButton(type: .system)
|
||||
@@ -50,7 +44,12 @@ class ToolbarView: UIView
|
||||
|
||||
override func sizeThatFits(_ size: CGSize) -> CGSize
|
||||
{
|
||||
return CGSize(width: size.width, height: 42.0)
|
||||
var height: CGFloat = 42.0
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
height = 40.0
|
||||
}
|
||||
|
||||
return CGSize(width: size.width, height: height)
|
||||
}
|
||||
|
||||
override func layoutSubviews()
|
||||
|
||||
@@ -88,7 +88,7 @@ class ToolbarViewController: UIViewController
|
||||
toolbarView.trailingButtonsView.removeAllButtonViews()
|
||||
|
||||
let spacerView = { () -> SpacerView in
|
||||
SpacerView(space: 24.0)
|
||||
SpacerView(space: 20.0)
|
||||
}
|
||||
|
||||
// Setup toolbar based on trait collection
|
||||
|
||||
Reference in New Issue
Block a user