fix: detail page bg color in dark mode

This commit is contained in:
yicheng 2023-07-24 09:17:01 +08:00
parent bbe83be779
commit fea5404fe7

View File

@ -34,12 +34,12 @@ class ConnectionDetailInfoView: NSView {
func updateColor() {
if #available(macOS 11.0, *) {
effectiveAppearance.performAsCurrentDrawingAppearance {
layer?.backgroundColor = NSColor.controlColor.cgColor
layer?.backgroundColor = NSColor.controlBackgroundColor.cgColor
}
} else {
let pervious = NSAppearance.current
NSAppearance.current = effectiveAppearance
layer?.backgroundColor = NSColor.controlColor.cgColor
layer?.backgroundColor = NSColor.controlBackgroundColor.cgColor
NSAppearance.current = pervious
}
}