mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: removed "Based on cluster" from all colors list. It must be available only in Bar chart widget.
This commit is contained in:
@@ -17,7 +17,7 @@ public class BarChart: WidgetWrapper {
|
||||
private var frameState: Bool = false
|
||||
private var colorState: Color = .systemAccent
|
||||
|
||||
private var colors: [Color] = Color.allCases
|
||||
private var colors: [Color] = [Color.cluster] + Color.allCases
|
||||
private var value: [[ColorValue]] = [[]]
|
||||
private var pressureLevel: DispatchSource.MemoryPressureEvent = .normal
|
||||
private var colorZones: colorZones = (0.6, 0.8)
|
||||
@@ -326,7 +326,7 @@ public class BarChart: WidgetWrapper {
|
||||
guard let key = sender.representedObject as? String else {
|
||||
return
|
||||
}
|
||||
if let newColor = Color.allCases.first(where: { $0.key == key }) {
|
||||
if let newColor = self.colors.first(where: { $0.key == key }) {
|
||||
self.colorState = newColor
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ extension Color: CaseIterable {
|
||||
} }
|
||||
|
||||
public static var allCases: [Color] {
|
||||
return [.utilization, .pressure, .cluster, separator1,
|
||||
return [.utilization, .pressure, separator1,
|
||||
.systemAccent, .monochrome, separator2,
|
||||
.clear, .white, .black, .gray, .secondGray, .darkGray, .lightGray,
|
||||
.red, .secondRed, .green, .secondGreen, .blue, .secondBlue, .yellow, .secondYellow,
|
||||
|
||||
Reference in New Issue
Block a user