fix(ui): 修正风扇转轴与速率图并精简进程表

This commit is contained in:
2026-11-15 19:21:18 +08:00
parent 99e558625b
commit 60c146f8b7
21 changed files with 303 additions and 107 deletions
+4 -3
View File
@@ -1,7 +1,7 @@
import AppKit
import SwiftUI
/// Verify the production section fills its assigned row even when the scope note wraps.
/// Verify the production section fills its assigned row after removing the scope row.
@main struct ProcessSectionChecks {
@MainActor static func main() {
_ = NSApplication.shared; NSApp.setActivationPolicy(.accessory)
@@ -26,16 +26,17 @@ import SwiftUI
try? await Task.sleep(for: .milliseconds(100)); host.layoutSubtreeIfNeeded()
let scrolls = descendants(host).compactMap { $0 as? NSScrollView }.filter { $0.documentView is NSTableView }
precondition(scrolls.count == 1)
precondition(!scrolls[0].hasHorizontalScroller)
let scroll = scrolls[0], rect = scroll.convert(scroll.bounds, to: host)
let topRect = host.isFlipped ? rect : CGRect(x: rect.minX, y: host.bounds.height - rect.maxY, width: rect.width, height: rect.height)
precondition(abs(topRect.maxY - 166) < 1 && topRect.height > 75,
precondition(abs(topRect.maxY - 166) < 1 && topRect.height > 110,
"The native table must fill the equal-height row down to its 10pt inset: \(language), \(width), \(topRect)")
precondition(abs(topRect.minX - 10) < 1 && abs(topRect.maxX - (width - 10)) < 1)
}
}
}
host.rootView = AnyView(EmptyView()); window.orderOut(nil); window.close()
print("PASS: production process section at 176pt, wrapped scope notes, full remaining table height, two widths, three languages and light/dark")
print("PASS: production process section at 176pt, no scope row or horizontal scrollbar, full remaining table height, two widths, three languages and light/dark")
NSApp.terminate(nil)
}
NSApp.run()