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
+6
View File
@@ -10,6 +10,12 @@ import CoreGraphics
precondition(visible.insetBy(dx: 16, dy: 16).contains(PanelLayout.constrainedFrame(frame, visible: visible)))
}
}
for size in [CGSize(width: 1240, height: 820), CGSize(width: 1160, height: 810)] {
let square = PanelLayout.resourceRowHeight(size: size)
let wide = PanelLayout.firstRowWideCardWidth(size: size)
precondition(square >= 220 && square <= 230)
precondition(abs(2 * wide + square + 16 - (size.width - 20)) < 0.001)
}
let input: [ProcessMetrics] = (0..<2000).map { (index: Int) -> ProcessMetrics in
let id = ProcessIdentity(pid: Int32(index + 1), seconds: 1, microseconds: 0)
let path: String? = index == 42 ? "/test/needle" : nil