mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
- fix battery charging state in a popup view
- add a visualization of battery level when charging (vertical bar)
This commit is contained in:
@@ -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"
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user