feat: added Based on utilization color option for Bar chart widget in the Battery module (#865)

This commit is contained in:
Serhiy Mytrovtsiy
2022-03-10 18:50:07 +01:00
parent 833c210826
commit e422278791
3 changed files with 4 additions and 3 deletions

View File

@@ -54,7 +54,6 @@
</dict>
<key>Unsupported colors</key>
<array>
<string>utilization</string>
<string>pressure</string>
</array>
<key>Order</key>

View File

@@ -117,7 +117,9 @@ public class Battery: Module {
case let widget as Mini:
widget.setValue(abs(value.level))
widget.setColorZones((0.15, 0.3))
case let widget as BarChart: widget.setValue([[ColorValue(value.level)]])
case let widget as BarChart:
widget.setValue([[ColorValue(value.level)]])
widget.setColorZones((0.15, 0.3))
case let widget as BatterykWidget:
widget.setValue(
percentage: value.level ,