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:
Serhiy Mytrovtsiy
2023-11-25 22:31:50 +01:00
parent 2686ae845f
commit d144aa68de
4 changed files with 38 additions and 24 deletions

View File

@@ -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))