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
+2 -3
View File
@@ -69,8 +69,7 @@ struct ProcessTableView: View {
}
}
.font(.system(size: 12)).padding(10)
.modifier(PanelCardBackground(radius: 14))
.overlay(RoundedRectangle(cornerRadius: 14).strokeBorder(.primary.opacity(0.1)))
.modifier(CardSurface())
.onAppear { rebuild(retainOrder: false) }
.onChange(of: snapshot?.date) { _, _ in rebuild(retainOrder: held && (byMemory ? rows.contains { $0.residentBytes != nil } : rows.contains { $0.cpu != nil })) }
.onChange(of: search) { _, _ in rebuild(retainOrder: held) }
@@ -92,7 +91,7 @@ struct ProcessTableView: View {
}
private var processTitle: some View {
HStack(spacing: 8) {
Label("panel.processes", systemImage: "list.bullet.rectangle").fontWeight(.semibold)
Label("panel.processes", systemImage: "list.bullet.rectangle").font(PanelStyle.title)
Text(verbatim: "\(snapshot?.readable ?? 0) / \(snapshot?.enumerated ?? 0) · \(rows.count)")
.foregroundStyle(.secondary).help(Text("panel.coverage"))
}