Improve HUDButton contrast

This commit is contained in:
Jed Fox 2022-12-23 10:57:53 -05:00
parent 0faea45485
commit 2a161886a1
No known key found for this signature in database
GPG Key ID: 0B61D18EA54B47E1
1 changed files with 3 additions and 4 deletions

View File

@ -12,18 +12,17 @@ public class HUDButton: UIView {
public static let height: CGFloat = 30
let background: UIVisualEffectView = {
let backgroundView = UIVisualEffectView(effect: UIBlurEffect(style: .systemUltraThinMaterial))
backgroundView.alpha = 0.9
let backgroundView = UIVisualEffectView(effect: UIBlurEffect(style: .systemThinMaterial))
backgroundView.layer.masksToBounds = true
backgroundView.layer.cornerRadius = HUDButton.height * 0.5
return backgroundView
}()
let vibrancyView = UIVisualEffectView(effect: UIVibrancyEffect(blurEffect: UIBlurEffect(style: .systemUltraThinMaterial)))
let vibrancyView = UIVisualEffectView(effect: UIVibrancyEffect(blurEffect: UIBlurEffect(style: .systemThinMaterial)))
public let button: UIButton = {
let button = HighlightDimmableButton()
button.expandEdgeInsets = UIEdgeInsets(top: -10, left: -10, bottom: -10, right: -10)
button.expandEdgeInsets = .constant(-10)
button.contentEdgeInsets = .constant(7)
button.imageView?.tintColor = .label
button.titleLabel?.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 15, weight: .bold))