Give detail URL status bar a dark background color when in dark mode.
This commit is contained in:
parent
25ff76e1e5
commit
3243c8dd4d
|
@ -14,7 +14,7 @@ final class DetailStatusBarView: NSView {
|
||||||
|
|
||||||
@IBOutlet var urlLabel: NSTextField!
|
@IBOutlet var urlLabel: NSTextField!
|
||||||
|
|
||||||
private var didConfigureLayer = false
|
private var didConfigureLayerRadius = false
|
||||||
private var mouseoverLink: String? {
|
private var mouseoverLink: String? {
|
||||||
didSet {
|
didSet {
|
||||||
updateLinkForDisplay()
|
updateLinkForDisplay()
|
||||||
|
@ -49,15 +49,16 @@ final class DetailStatusBarView: NSView {
|
||||||
|
|
||||||
override func updateLayer() {
|
override func updateLayer() {
|
||||||
|
|
||||||
guard !didConfigureLayer else {
|
guard let layer = layer else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if let layer = layer {
|
if !didConfigureLayerRadius {
|
||||||
let color = appDelegate.currentTheme.color(forKey: "MainWindow.Detail.statusBar.backgroundColor")
|
|
||||||
layer.backgroundColor = color.cgColor
|
|
||||||
layer.cornerRadius = 4.0
|
layer.cornerRadius = 4.0
|
||||||
didConfigureLayer = true
|
didConfigureLayerRadius = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let color = self.effectiveAppearance.isDarkMode ? NSColor.textBackgroundColor : appDelegate.currentTheme.color(forKey: "MainWindow.Detail.statusBar.backgroundColor")
|
||||||
|
layer.backgroundColor = color.cgColor
|
||||||
}
|
}
|
||||||
|
|
||||||
override func awakeFromNib() {
|
override func awakeFromNib() {
|
||||||
|
|
Loading…
Reference in New Issue