Dark mode appearance tweaks

This commit is contained in:
James Magahern
2022-02-21 15:52:18 -08:00
parent c8b4242bc6
commit 224a39b64f
3 changed files with 16 additions and 27 deletions

View File

@@ -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()

View File

@@ -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