mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: set color for efficiency and performance cores in the BarChart widget based on the selected color in the popup view settings (#1686)
This commit is contained in:
@@ -201,22 +201,6 @@ public extension Double {
|
||||
}
|
||||
}
|
||||
|
||||
func clusterColor(_ i: Int) -> NSColor? {
|
||||
guard let cores = SystemKit.shared.device.info.cpu?.cores,
|
||||
let core = cores.first(where: {$0.id == i }) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
switch core.type {
|
||||
case .efficiency:
|
||||
return .systemTeal
|
||||
case .performance:
|
||||
return .systemBlue
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func secondsToHoursMinutesSeconds() -> (Int, Int) {
|
||||
let mins = (self.truncatingRemainder(dividingBy: 3600)) / 60
|
||||
return (Int(self / 3600), Int(mins))
|
||||
|
||||
Reference in New Issue
Block a user