adds nice git interface

This commit is contained in:
2026-10-30 13:21:45 +01:00
parent b9c03a7637
commit caec81e762
107 changed files with 6466 additions and 3992 deletions
@@ -196,9 +196,10 @@ extension PointerPolicy {
scheduleUpdate(in: window)
}
/// The Git view counts as an overlay: it covers every column and its own views sit on the overlay layer.
static func isOverlayOpen(in window: NSWindow?) -> Bool {
guard let window else { return false }
return WorkspaceRegistry.model(for: window)?.overlay.isPresented ?? false
guard let window, let model = WorkspaceRegistry.model(for: window) else { return false }
return model.overlay.isPresented || model.layout.isGitViewOpen
}
/// Re-reads the pointer for a mouse that has not moved, once SwiftUI has applied the change that asked for it.
@@ -420,7 +421,7 @@ final class PointerTracker: NSResponder {
}
extension EnvironmentValues {
/// The overlay host sets `.overlay`, so the regions inside it keep their pointer while the columns lose theirs.
/// The overlay host and the Git view set `.overlay`, so the regions inside them keep their pointer while the columns lose theirs.
@Entry var pointerLayer = PointerLayer.workspace
/// False under `disabledLook`, whose hit-testing switch SwiftUI does not expose.
@Entry var allowsPointerHand = true