fix(memory): 对齐概念图配色与底栏排版
This commit is contained in:
@@ -231,12 +231,12 @@ struct MenuPanelView: View {
|
||||
}.font(.system(size: 10)).help(Text("gpu.pipelineHelp"))
|
||||
}
|
||||
private var memoryCard: some View {
|
||||
ResourceCard(title: "metric.memory", symbol: "memorychip", color: Color("MetricMemory"),
|
||||
ResourceCard(title: "metric.memory", symbol: "memorychip", color: Color("MemoryApplication"),
|
||||
value: snapshot.memory.map { String(format: "%.1f / %.0f GiB", Double($0.used) / 1_073_741_824, Double($0.total) / 1_073_741_824) } ?? "--") {
|
||||
PanelTrendChart(dates: samples.map(\.date),
|
||||
first: samples.map { $0.memory.map { $0 * Double(snapshot.memory?.total ?? 1) } },
|
||||
color: Color("MetricMemory"), fixedScale: Double(snapshot.memory?.total ?? 1),
|
||||
scaleLabel: MetricFormat.memory(snapshot.memory?.total), firstValueFormat: .memory,
|
||||
color: Color("MemoryApplication"), fixedScale: Double(snapshot.memory?.total ?? 1),
|
||||
scaleLabel: MetricFormat.memory(snapshot.memory?.total), firstValueFormat: .memory, firstLabel: "gpu.totalUtilization",
|
||||
expectedInterval: chartInterval, boundaryDates: chartBoundaries, intervals: chartIntervals)
|
||||
if let memory = snapshot.memory {
|
||||
MemoryDetailsView(memory: memory)
|
||||
|
||||
Reference in New Issue
Block a user