fix(ui): 提升卡片文字对比度与辅助信息可读性
This commit is contained in:
@@ -60,10 +60,10 @@ struct CPUCoreGrid: View {
|
||||
Circle().fill(color(kinds[groups[group][0]])).frame(width: 3, height: 3)
|
||||
if let kind = kinds[groups[group][0]] { label(kind, compact: true) }
|
||||
else { Text("cpu.core") }
|
||||
Text(verbatim: "\(groups[group].count)").foregroundStyle(.secondary)
|
||||
Text(verbatim: "\(groups[group].count)").foregroundStyle(.primary)
|
||||
}
|
||||
.font(.system(size: 8, weight: .medium)).lineLimit(1).minimumScaleFactor(0.65)
|
||||
.frame(height: 10)
|
||||
.font(.system(size: 9, weight: .medium)).lineLimit(1).minimumScaleFactor(0.65)
|
||||
.frame(height: 12)
|
||||
CPUCoreGridLayout {
|
||||
ForEach(groups[group], id: \.self) { index in core(index: index) }
|
||||
}
|
||||
@@ -79,7 +79,7 @@ struct CPUCoreGrid: View {
|
||||
private func gridHeight(groups: [[Int]]) -> CGFloat {
|
||||
let widths = Self.groupWidths(groups: groups, width: availableWidth)
|
||||
let rows = zip(groups, widths).map { CPUCoreGridLayout.rowCounts(count: $0.0.count, width: $0.1).count }.max() ?? 0
|
||||
return 14 + CGFloat(rows) * CPUCoreGridLayout.rowHeight + CGFloat(max(0, rows - 1)) * CPUCoreGridLayout.rowSpacing
|
||||
return 16 + CGFloat(rows) * CPUCoreGridLayout.rowHeight + CGFloat(max(0, rows - 1)) * CPUCoreGridLayout.rowSpacing
|
||||
}
|
||||
|
||||
private func core(index: Int) -> some View {
|
||||
|
||||
Reference in New Issue
Block a user