Make sidebar status bar vibrant. Fix #369.
This commit is contained in:
parent
ce0d2450b8
commit
73b85bdd92
|
@ -17,8 +17,6 @@ final class SidebarStatusBarView: NSView {
|
||||||
@IBOutlet var progressIndicator: NSProgressIndicator!
|
@IBOutlet var progressIndicator: NSProgressIndicator!
|
||||||
@IBOutlet var progressLabel: NSTextField!
|
@IBOutlet var progressLabel: NSTextField!
|
||||||
|
|
||||||
private var didConfigureLayer = false
|
|
||||||
|
|
||||||
private var isAnimatingProgress = false {
|
private var isAnimatingProgress = false {
|
||||||
didSet {
|
didSet {
|
||||||
progressIndicator.isHidden = !isAnimatingProgress
|
progressIndicator.isHidden = !isAnimatingProgress
|
||||||
|
@ -35,10 +33,6 @@ final class SidebarStatusBarView: NSView {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
override var wantsUpdateLayer: Bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
override func awakeFromNib() {
|
override func awakeFromNib() {
|
||||||
|
|
||||||
progressIndicator.isHidden = true
|
progressIndicator.isHidden = true
|
||||||
|
@ -51,17 +45,6 @@ final class SidebarStatusBarView: NSView {
|
||||||
NotificationCenter.default.addObserver(self, selector: #selector(progressDidChange(_:)), name: .AccountRefreshProgressDidChange, object: nil)
|
NotificationCenter.default.addObserver(self, selector: #selector(progressDidChange(_:)), name: .AccountRefreshProgressDidChange, object: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
override func updateLayer() {
|
|
||||||
|
|
||||||
guard let layer = layer, !didConfigureLayer else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
let color = NSColor(calibratedWhite: 0.96, alpha: 1.0)
|
|
||||||
layer.backgroundColor = color.cgColor
|
|
||||||
didConfigureLayer = true
|
|
||||||
}
|
|
||||||
|
|
||||||
@objc func updateUI() {
|
@objc func updateUI() {
|
||||||
|
|
||||||
guard let progress = progress else {
|
guard let progress = progress else {
|
||||||
|
|
Loading…
Reference in New Issue