fix: keep alignment guides continuous behind launcher
This commit is contained in:
@@ -34,7 +34,6 @@ final class LauncherAlignmentGuides {
|
||||
overlay.setFrame(frame, display: false)
|
||||
}
|
||||
view.targetFrame = alignment.targetFrame.offsetBy(dx: -frame.minX, dy: -frame.minY)
|
||||
view.launcherFrame = window.frame.offsetBy(dx: -frame.minX, dy: -frame.minY)
|
||||
view.snapsHorizontally = alignment.snappedOrigin.x == alignment.targetFrame.minX
|
||||
view.snapsVertically = alignment.snappedOrigin.y == alignment.targetFrame.minY
|
||||
view.needsDisplay = true
|
||||
@@ -55,7 +54,6 @@ final class LauncherAlignmentGuides {
|
||||
|
||||
@MainActor
|
||||
private final class AlignmentGuideView: NSView {
|
||||
var launcherFrame = NSRect.zero
|
||||
var targetFrame = NSRect.zero
|
||||
var snapsHorizontally = false
|
||||
var snapsVertically = false
|
||||
@@ -71,8 +69,7 @@ private final class AlignmentGuideView: NSView {
|
||||
context.saveGState()
|
||||
defer { context.restoreGState() }
|
||||
context.addRect(bounds)
|
||||
context.addRect(launcherFrame.insetBy(dx: 0.75, dy: 0.75))
|
||||
context.clip(using: .evenOdd)
|
||||
context.clip()
|
||||
context.setLineWidth(1.5)
|
||||
context.setLineCap(.round)
|
||||
context.setLineDash(phase: 0, lengths: Self.dash)
|
||||
|
||||
Reference in New Issue
Block a user