feat: snap launcher on release at upper-third alignment
This commit is contained in:
@@ -40,7 +40,7 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
window.delegate = self
|
||||
window.navigateSelection = { [weak self] offset in self?.moveSelection(by: offset) }
|
||||
window.dismiss = { [weak self] in self?.dismiss() }
|
||||
window.dragEnded = { [weak self] in self?.alignmentGuides?.end() }
|
||||
window.dragEnded = { [weak self] in self?.alignmentGuides?.end(snapping: self?.window) }
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
@@ -505,7 +505,7 @@ private final class LauncherPanel: NSPanel {
|
||||
}
|
||||
}
|
||||
super.sendEvent(event)
|
||||
if event.type == .leftMouseDown || event.type == .leftMouseUp {
|
||||
if event.type == .leftMouseUp || (event.type == .leftMouseDown && NSEvent.pressedMouseButtons & 1 == 0) {
|
||||
dragEnded?()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user