fix(ui): 修正风扇转轴与速率图并精简进程表

This commit is contained in:
2026-11-15 19:21:18 +08:00
parent 99e558625b
commit 60c146f8b7
21 changed files with 303 additions and 107 deletions
@@ -2,9 +2,8 @@ import SwiftUI
struct MemoryDetailsView: View {
let memory: MemoryMetrics
private var values: [UInt64] { [memory.app, memory.wired, memory.compressed, memory.available] }
private var values: [UInt64] { [memory.app, memory.wired, memory.compressed] }
private let labels: [LocalizedStringKey] = ["memory.appShort", "memory.wiredShort", "memory.compressedShort"]
private var colors: [Color] { [Color("MemoryApplication"), Color("MemoryWired"), Color("MemoryCompressed"), Color("MemoryAvailable")] }
var body: some View {
VStack(alignment: .leading, spacing: 4) {
@@ -21,12 +20,12 @@ struct MemoryDetailsView: View {
}
.font(.system(size: 8)).foregroundStyle(.secondary)
.lineLimit(1).minimumScaleFactor(0.75)
CapacityBar(values: values.map { Double($0) }, colors: colors, total: Double(memory.total), height: 4)
HStack(spacing: 4) {
Text("memory.available").foregroundStyle(.secondary)
MetricText(value: MetricFormat.memory(memory.available))
}.font(.system(size: 9)).lineLimit(1)
}
.help(Text("memory.distributionHelp"))
.accessibilityElement(children: .contain)
.accessibilityLabel(Text("memory.distribution"))
}