refactor(ui): 统一胶囊页签并将面板收窄至640点
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user