mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: fixed wrong ram pressure levels colorizing. Moved from int to the internal levels variable (DispatchSource.MemoryPressureEvent) (#1010)
This commit is contained in:
@@ -107,14 +107,14 @@ extension String: LocalizedError {
|
||||
}
|
||||
}
|
||||
|
||||
public extension Int {
|
||||
public extension DispatchSource.MemoryPressureEvent {
|
||||
func pressureColor() -> NSColor {
|
||||
switch self {
|
||||
case 1:
|
||||
case .normal:
|
||||
return NSColor.systemGreen
|
||||
case 2:
|
||||
case .warning:
|
||||
return NSColor.systemYellow
|
||||
case 3:
|
||||
case .critical:
|
||||
return NSColor.systemRed
|
||||
default:
|
||||
return controlAccentColor
|
||||
|
||||
Reference in New Issue
Block a user