fix(ui): 缩小卡片并还原设计稿紧凑排布
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user