perf(efficiency): 落实首批采样减负与发行包瘦身
This commit is contained in:
@@ -5,7 +5,6 @@ struct CPUCoreGrid: View {
|
||||
let values: [Double]
|
||||
let kinds: [Int: CPUCoreTopology.Kind]
|
||||
let interval: TimeInterval
|
||||
@Environment(\.accessibilityReduceMotion) private var reduceMotion
|
||||
|
||||
private func color(_ kind: CPUCoreTopology.Kind?) -> Color {
|
||||
switch kind {
|
||||
@@ -93,7 +92,6 @@ struct CPUCoreGrid: View {
|
||||
Circle().inset(by: 1).trim(from: 0, to: value)
|
||||
.stroke(color(kind), style: StrokeStyle(lineWidth: 2, lineCap: .round))
|
||||
.rotationEffect(.degrees(-90))
|
||||
.animation(reduceMotion ? nil : .easeInOut(duration: min(0.35, interval * 0.8)), value: value)
|
||||
Text(verbatim: "\(Int((value * 100).rounded()))")
|
||||
.font(.system(size: 8, weight: .medium)).lineLimit(1).minimumScaleFactor(0.4)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user