refactor(ui): 统一胶囊页签并将面板收窄至640点

This commit is contained in:
2026-11-08 15:06:27 +08:00
parent 48f7ac73c0
commit 521319ef93
18 changed files with 223 additions and 26 deletions
@@ -88,7 +88,8 @@ extension MenuPanelView {
thirdColor: Color("MemoryWired"), fourthColor: Color("MemoryCompressed"), fixedScale: Double(snapshot.memory?.total ?? 1),
scaleLabel: MetricFormat.memory(snapshot.memory?.total), firstValueFormat: .memory, firstLabel: "gpu.totalUtilization",
secondLabel: "memory.app", thirdLabel: "memory.wired", fourthLabel: "memory.compressed",
expectedInterval: chartInterval, boundaryDates: chartBoundaries, intervals: chartIntervals)
expectedInterval: chartInterval, boundaryDates: chartBoundaries, intervals: chartIntervals,
showsLegendValues: cardContentWidth >= 340)
if let memory = snapshot.memory {
MemoryDetailsView(memory: memory)
} else {
@@ -184,7 +185,8 @@ extension MenuPanelView {
Text("battery.timeEstimate").foregroundStyle(.secondary)
Spacer(minLength: 4)
if battery.externalPower {
Text("battery.timeNotApplicable").font(PanelStyle.value)
Text("battery.notApplicableShort").font(PanelStyle.value)
.help(Text("battery.timeNotApplicable"))
} else if let minutes = battery.minutesRemaining {
MetricText(value: "\(minutes) min").font(PanelStyle.value)
} else {