- fix battery charging state in a popup view

- add a visualization of battery level when charging (vertical bar)
This commit is contained in:
Serhiy Mytrovtsiy
2020-07-24 10:28:14 +02:00
parent 53ee554380
commit 383f4195bb
2 changed files with 17 additions and 15 deletions

View File

@@ -162,7 +162,7 @@ internal class Popup: NSView {
self.temperatureField?.stringValue = "\(value.temperature) °C"
self.powerField?.stringValue = value.powerSource == "Battery Power" ? "Not connected" : "\(value.ACwatts) W"
self.chargingStateField?.stringValue = value.level > 0 ? "Yes" : "No"
self.chargingStateField?.stringValue = value.isCharging ? "Yes" : "No"
})
}
}