feat(panel): 调整资源卡片读数布局并保留趋势平移
逐核显示 CPU 占用,在 GPU 标题展示核数并补充分项读数。无电池设备显示整机功率。 存储与网络将曲线排在详情下方,CPU、GPU、内存和电池保留整卡趋势。数值直接刷新,曲线随采样平滑平移。顶栏展示版本号,底栏调整开机时间和刷新间隔。
This commit is contained in:
@@ -95,6 +95,20 @@ import QuartzCore
|
||||
series: [Array(repeating: 0.8, count: 59) + [0.5]], intervals: fullFrame.intervals, boundaryDates: [])
|
||||
plot.configure(.init(frame: appended, colors: [.red], scales: [1], maximumGap: 5))
|
||||
precondition(plot.input?.frame.dates.count == 60, "Static history must not retain an outgoing animation point")
|
||||
var moving = NativePanelCurve.Input(frame: appended, colors: [.red], scales: [1], maximumGap: 5, animates: true)
|
||||
plot.configure(.init(frame: fullFrame, colors: [.red], scales: [1], maximumGap: 5))
|
||||
plot.configure(moving)
|
||||
let slide = plot.curves.animation(forKey: "trend.slide") as? CABasicAnimation
|
||||
let start = (slide?.fromValue as? NSValue)?.caTransform3DValue
|
||||
precondition(abs((start?.m41 ?? 0) - 280.0/59) < 0.001 && slide?.duration == 0.35)
|
||||
let movingBuilds = plot.pathBuildCount
|
||||
moving.hoveredIndex = 3
|
||||
plot.configure(moving)
|
||||
precondition(plot.curves.animationKeys()?.isEmpty != false && plot.pathBuildCount == movingBuilds)
|
||||
plot.configure(.init(frame: .init(dates: Array(appended.dates.dropFirst()) + [Date(timeIntervalSinceReferenceDate: 122)],
|
||||
series: appended.series, intervals: appended.intervals, boundaryDates: [Date(timeIntervalSinceReferenceDate: 122)]),
|
||||
colors: [.red], scales: [1], maximumGap: 5, animates: true))
|
||||
precondition(plot.curves.animationKeys()?.isEmpty != false, "Do not slide through a pause")
|
||||
// Adding a series with an unchanged palette must color the new layer too.
|
||||
plot.configure(.init(frame: PanelCurveFrame(dates: dates, series: [[nil,nil,nil,nil], [0.5,0.5,0.5,0.5]],
|
||||
intervals: [2,2,2,2], boundaryDates: []), colors: [.red], scales: [1], maximumGap: 5))
|
||||
@@ -163,7 +177,7 @@ import QuartzCore
|
||||
assertStatic(plot.layer!)
|
||||
plot.removeFromSuperview()
|
||||
window.orderOut(nil); window.close()
|
||||
print("PASS: bidirectional rate areas/zero axis/direction/hover/gaps, stacked component pixels and cumulative hover, static background lines/area pixels, no single-point fill, hidden-series isolation, immediate stable updates, no animation/material/gradient layers, real gaps, hover cache, palette growth, appearance, full history and unmount")
|
||||
print("PASS: bidirectional rate areas/zero axis/direction/hover/gaps, stacked component pixels and cumulative hover, static background lines/area pixels, no single-point fill, hidden-series isolation, reduced-motion stable updates, rolling transform and hover cancellation, real gaps, hover cache, palette growth, appearance, full history and unmount")
|
||||
fflush(stdout); NSApp.terminate(nil)
|
||||
}
|
||||
NSApp.run()
|
||||
|
||||
Reference in New Issue
Block a user