cap cpu gauge % to 100 in compact view

This commit is contained in:
Bradley Cicenas
2017-03-13 09:00:17 +11:00
parent ca61ec712e
commit 3553b0af9d
+3
View File
@@ -30,6 +30,9 @@ func (row *Compact) SetCPU(val int) {
val = 5 val = 5
row.Cpu.BarColor = ui.ThemeAttr("gauge.bar.bg") row.Cpu.BarColor = ui.ThemeAttr("gauge.bar.bg")
} }
if val > 100 {
val = 100
}
row.Cpu.Percent = val row.Cpu.Percent = val
} }