refactor(ui): 统一资源卡片规范并收敛面板布局与公共组件

This commit is contained in:
2026-11-03 18:59:45 +08:00
parent a14549bb58
commit 1419bbbe09
16 changed files with 801 additions and 586 deletions
@@ -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)