fix(ui): 缩小卡片并还原设计稿紧凑排布

This commit is contained in:
2026-11-15 17:14:42 +08:00
parent 3c1a2baace
commit d87aa3ccc5
29 changed files with 609 additions and 272 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ struct MenuPanelView: View {
let coreCount = max(CPUCoreTopology.cores.count, ProcessInfo.processInfo.processorCount, snapshot.cpu?.cores.count ?? 0)
let groups = CPUCoreGrid.groups(count: coreCount, kinds: CPUCoreTopology.cores)
let widths = CPUCoreGrid.groupWidths(groups: groups, width: cardContentWidth)
let coreRows = zip(groups, widths).map { CPUCoreGridLayout.rowCounts(count: $0.0.count, width: $0.1).count }.max() ?? 0
let coreRows = zip(groups, widths).map { CPUCoreGridLayout.rowCounts(count: $0.0.count, width: $0.1).count }.reduce(0, +)
let fanCount = reservedFanCount > 0 ? max(reservedFanCount, snapshot.fans?.count ?? 0) : snapshot.fans?.count
return PanelLayout.cardHeights(coreRows: coreRows, fanCount: fanCount)
}