feat(menubar): 实现紧凑独立双列与按内容定高

This commit is contained in:
2026-11-08 18:47:01 +08:00
parent 8821089872
commit 8d3891966a
22 changed files with 259 additions and 128 deletions
@@ -9,8 +9,6 @@ struct MemoryDetailsView: View {
var body: some View {
VStack(alignment: .leading, spacing: 4) {
CardSeparator()
CardSectionHeader(title: "memory.distribution", valueLabel: "gpu.totalUtilization",
value: MetricFormat.percent(memory.usage), color: Color("MemoryApplication"))
CapacityBar(values: values.map { Double($0) }, colors: colors, total: Double(memory.total))
HStack(spacing: 4) {
ForEach(0..<4) { index in
@@ -30,6 +28,8 @@ struct MemoryDetailsView: View {
}
}.font(PanelStyle.label).lineLimit(1)
}
.accessibilityElement(children: .contain)
.accessibilityLabel(Text("memory.distribution"))
}
@ViewBuilder private var pressure: some View {