fix: added cluster color to the list of all colors (#1154)

This commit is contained in:
Serhiy Mytrovtsiy
2022-11-07 18:40:08 +01:00
parent 66fb1ff62c
commit 3d7270c946
2 changed files with 3 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ public class BarChart: WidgetWrapper {
private var frameState: Bool = false
private var colorState: Color = .systemAccent
private var colors: [Color] = [Color.cluster] + Color.allCases
private var colors: [Color] = Color.allCases
private var value: [[ColorValue]] = [[]]
private var pressureLevel: DispatchSource.MemoryPressureEvent = .normal
private var colorZones: colorZones = (0.6, 0.8)
@@ -330,6 +330,7 @@ public class BarChart: WidgetWrapper {
self.colorState = newColor
}
print(key)
Store.shared.set(key: "\(self.title)_\(self.type.rawValue)_color", value: key)
self.display()
}

View File

@@ -163,7 +163,7 @@ extension Color: CaseIterable {
} }
public static var allCases: [Color] {
return [.utilization, .pressure, separator1,
return [.utilization, .pressure, .cluster, separator1,
.systemAccent, .monochrome, separator2,
.clear, .white, .black, .gray, .secondGray, .darkGray, .lightGray,
.red, .secondRed, .green, .secondGreen, .blue, .secondBlue, .yellow, .secondYellow,