fix(memory): 对齐概念图配色与底栏排版
This commit is contained in:
@@ -3,7 +3,7 @@ import SwiftUI
|
||||
struct MemoryDetailsView: View {
|
||||
let memory: MemoryMetrics
|
||||
@Environment(\.accessibilityReduceMotion) private var reduceMotion
|
||||
private var colors: [Color] { [Color("MetricMemory"), Color("MetricNetwork"), Color("MetricDisk"), .secondary.opacity(0.25)] }
|
||||
private var colors: [Color] { [Color("MemoryApplication"), Color("MemoryWired"), Color("MemoryCompressed"), Color("MemoryAvailable")] }
|
||||
private var values: [UInt64] { [memory.app, memory.wired, memory.compressed, memory.available] }
|
||||
private let labels: [LocalizedStringKey] = ["memory.app", "memory.wired", "memory.compressed", "memory.available"]
|
||||
|
||||
@@ -13,8 +13,8 @@ struct MemoryDetailsView: View {
|
||||
HStack {
|
||||
Text("memory.distribution").fontWeight(.semibold)
|
||||
Spacer()
|
||||
Text("panel.total").foregroundStyle(.secondary)
|
||||
AnimatedMetricText(value: MetricFormat.percent(memory.usage)).foregroundStyle(Color("MetricMemory"))
|
||||
Text("gpu.totalUtilization").foregroundStyle(.secondary)
|
||||
AnimatedMetricText(value: MetricFormat.percent(memory.usage)).foregroundStyle(Color("MemoryApplication"))
|
||||
}
|
||||
GeometryReader { proxy in
|
||||
HStack(spacing: 0) {
|
||||
@@ -45,11 +45,13 @@ struct MemoryDetailsView: View {
|
||||
Text("memory.pressure").foregroundStyle(.secondary)
|
||||
pressure
|
||||
}.frame(maxWidth: .infinity, alignment: .leading)
|
||||
Divider().frame(height: 30)
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text("memory.cached").foregroundStyle(.secondary)
|
||||
AnimatedMetricText(value: MetricFormat.memory(memory.cached))
|
||||
}.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.help(Text("memory.cachedHelp"))
|
||||
Divider().frame(height: 30)
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text("memory.swap").foregroundStyle(.secondary)
|
||||
AnimatedMetricText(value: MetricFormat.memory(memory.swapUsed))
|
||||
|
||||
Reference in New Issue
Block a user