refactor(project): 清理闲置展示链路与重复采样状态

This commit is contained in:
2026-11-09 00:41:09 +08:00
parent 7b3abe37c5
commit b73d51c953
57 changed files with 210 additions and 2822 deletions
+1 -18
View File
@@ -4,23 +4,6 @@ import CoreGraphics
@main struct PresentationChecks {
@MainActor static func main() {
let screen = CGRect(x: 0, y: 0, width: 1440, height: 900)
let parent = CGRect(x: 400, y: 400, width: 320, height: 240)
let anchor = CGRect(x: 410, y: 600, width: 300, height: 40)
let size = CGSize(width: 280, height: 180)
let right = DetailPlacement.frame(anchor: anchor, parent: parent, content: size, visible: screen)
precondition(right.minX == parent.maxX + 4 && right.maxY == anchor.maxY)
let edgeParent = CGRect(x: 1100, y: 400, width: 320, height: 240)
let left = DetailPlacement.frame(anchor: anchor, parent: edgeParent, content: size, visible: screen)
precondition(left.maxX == edgeParent.minX - 4)
for visible in [screen, CGRect(x: -1440, y: -200, width: 1440, height: 900), CGRect(x: 0, y: 0, width: 200, height: 100)] {
let result = DetailPlacement.frame(anchor: anchor, parent: parent, content: size, visible: visible)
precondition(visible.contains(result))
}
let highAnchor = CGRect(x: 400, y: 1100, width: 300, height: 40)
precondition(DetailPlacement.frame(anchor: highAnchor, parent: parent, content: size, visible: screen).maxY == screen.maxY)
let lowAnchor = CGRect(x: 400, y: -200, width: 300, height: 40)
precondition(DetailPlacement.frame(anchor: lowAnchor, parent: parent, content: size, visible: screen).minY == screen.minY)
precondition(AppAppearance.system.resolved(systemIsDark: true) == .dark)
precondition(AppAppearance.system.resolved(systemIsDark: false) == .light)
precondition(AppAppearance.light.resolved(systemIsDark: true) == .light)
@@ -42,6 +25,6 @@ import CoreGraphics
precondition(NSApp.appearance === global)
}
window.close()
print("PASS: outward placement, edge fallback, negative screen origins, vertical limits, explicit/system window appearance reset, independent system resolution")
print("PASS: explicit/system window appearance reset, independent system resolution")
}
}