feat(cpu): 图形化展示负载并平滑更新核心占用
This commit is contained in:
@@ -11,9 +11,7 @@ struct MetricProgressBar: View {
|
||||
GeometryReader { proxy in
|
||||
ZStack(alignment: .leading) {
|
||||
Capsule().fill(color.opacity(0.15))
|
||||
if fraction > 0 {
|
||||
Capsule().fill(color).frame(width: proxy.size.width * fraction)
|
||||
}
|
||||
Capsule().fill(color).frame(width: proxy.size.width * fraction)
|
||||
}
|
||||
.frame(width: proxy.size.width, height: proxy.size.height)
|
||||
.clipShape(Capsule())
|
||||
|
||||
Reference in New Issue
Block a user