fix(ui): 裁剪极小值进度条避免溢出圆角轨道
This commit is contained in:
@@ -114,10 +114,7 @@ struct MenuPanelView: View {
|
||||
ForEach(Array(cpu.cores.enumerated()), id: \.offset) { index, value in
|
||||
HStack(spacing: 3) {
|
||||
Text(verbatim: "\(index + 1)").font(.system(size: 9)).frame(width: 12)
|
||||
GeometryReader { proxy in
|
||||
Capsule().fill(Color("MetricCPU").opacity(0.15))
|
||||
Capsule().fill(Color("MetricCPU")).frame(width: proxy.size.width * value)
|
||||
}.frame(height: 7)
|
||||
MetricProgressBar(value: value, color: Color("MetricCPU")).frame(height: 7)
|
||||
}.help("\(index + 1): \(MetricFormat.percent(value))")
|
||||
.accessibilityLabel(Text("cpu.core")).accessibilityValue("\(index + 1): \(MetricFormat.percent(value))")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user