mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
cap cpu gauge % to 100 in compact view
This commit is contained in:
@@ -30,6 +30,9 @@ func (row *Compact) SetCPU(val int) {
|
||||
val = 5
|
||||
row.Cpu.BarColor = ui.ThemeAttr("gauge.bar.bg")
|
||||
}
|
||||
if val > 100 {
|
||||
val = 100
|
||||
}
|
||||
row.Cpu.Percent = val
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user