feat: change value type from Double to ColorValue in the BarChart (#441)

This commit is contained in:
Serhiy Mytrovtsiy
2021-08-02 20:11:48 +02:00
parent 83e6e21ec2
commit 918a07150b
8 changed files with 69 additions and 49 deletions

View File

@@ -200,7 +200,7 @@ public class Disk: Module {
self.widgets.filter{ $0.isActive }.forEach { (w: Widget) in
switch w.item {
case let widget as Mini: widget.setValue(percentage)
case let widget as BarChart: widget.setValue([percentage])
case let widget as BarChart: widget.setValue([[ColorValue(percentage)]])
case let widget as MemoryWidget: widget.setValue((DiskSize(free).getReadableMemory(), DiskSize(usedSpace).getReadableMemory()))
default: break
}