feat(menubar): 调整两排卡片布局并加入复合曲线与数值动效

This commit is contained in:
2026-11-03 10:10:44 +08:00
parent 0e8f598fe6
commit 906293b7c1
22 changed files with 400 additions and 122 deletions
+2 -2
View File
@@ -7,11 +7,11 @@ import AppKit
NSAppearance(named: appearance)!.performAsCurrentDrawingAppearance {
for name in ["PanelCard", "MetricCPU", "MetricGPU", "MetricMemory", "MetricNetwork", "MetricDisk", "MetricBattery"] {
guard let color = NSColor(named: NSColor.Name(name), bundle: bundle)?.usingColorSpace(.sRGB) else { fatalError("Missing color: \(name)") }
precondition(abs(color.alphaComponent - 1) < 0.001, "Transparent \(name)")
precondition(abs(color.alphaComponent - (name == "PanelCard" ? 0.68 : 1)) < 0.005, "Unexpected alpha \(name)")
if name == "MetricGPU" && appearance == .darkAqua { precondition(color.blueComponent > 0.99) }
}
}
}
print("PASS: compiled light/dark semantic colors exist, fully opaque, GPU blue component is normalized")
print("PASS: compiled light/dark semantic colors exist, card translucent/semantic colors opaque, GPU blue component is normalized")
}
}