|
|
@@ -4515,6 +4515,18 @@ class ViewController: NSViewController {
|
|
|
])
|
|
|
button = created
|
|
|
}
|
|
|
+ let blurView = button.subviews.compactMap { $0 as? NSVisualEffectView }.first
|
|
|
+ let dimView = button.subviews.first { $0 is NSVisualEffectView == false }
|
|
|
+ if palette.isDarkMode {
|
|
|
+ blurView?.material = .hudWindow
|
|
|
+ button.contentTintColor = .white
|
|
|
+ dimView?.layer?.backgroundColor = NSColor.black.withAlphaComponent(0.72).cgColor
|
|
|
+ } else {
|
|
|
+ // Lighter, cleaner lock treatment in light mode.
|
|
|
+ blurView?.material = .popover
|
|
|
+ button.contentTintColor = NSColor(calibratedWhite: 0.09, alpha: 1.0)
|
|
|
+ dimView?.layer?.backgroundColor = NSColor.white.withAlphaComponent(0.38).cgColor
|
|
|
+ }
|
|
|
button.title = message
|
|
|
button.isHidden = locked == false
|
|
|
return button
|