refactor(ui): 统一资源卡片规范并收敛面板布局与公共组件
This commit is contained in:
@@ -21,7 +21,7 @@ struct GPUStatisticsView: View {
|
||||
MetricRingGauge(title: "gpu.recentAverage", value: average, color: Color("MetricCPU"))
|
||||
MetricRingGauge(title: "gpu.peak", value: peak, color: Color("MetricGPU"))
|
||||
}.frame(maxWidth: .infinity).help(Text("gpu.summaryHelp"))
|
||||
}.frame(height: 42)
|
||||
}.frame(height: 46)
|
||||
}
|
||||
|
||||
private func memoryRow(_ title: LocalizedStringKey, bytes: UInt64?, color: Color) -> some View {
|
||||
@@ -29,8 +29,8 @@ struct GPUStatisticsView: View {
|
||||
HStack(spacing: 4) {
|
||||
Text(title).foregroundStyle(.secondary)
|
||||
Spacer(minLength: 0)
|
||||
AnimatedMetricText(value: MetricFormat.bytes(bytes)).fontWeight(.medium)
|
||||
}.font(.system(size: 9)).lineLimit(1).minimumScaleFactor(0.7)
|
||||
AnimatedMetricText(value: MetricFormat.bytes(bytes)).font(PanelStyle.value)
|
||||
}.font(PanelStyle.label).lineLimit(1)
|
||||
MetricProgressBar(value: bytes.map { Double($0) / reference } ?? 0, color: color)
|
||||
.frame(height: 3)
|
||||
.animation(reduceMotion ? nil : .easeInOut(duration: 0.35), value: bytes)
|
||||
|
||||
Reference in New Issue
Block a user