1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-24 03:25:03 +03:00
This commit is contained in:
Tae Won Ha 2020-12-06 19:57:17 +01:00
parent 97eb7c8e49
commit 6b5edb99cf
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ import Cocoa
class DraggingSingleRowStackView: NSStackView {
var isDraggingEnabled = true
var postDraggingAction: ((NSStackView) -> Void)?
var postDraggingHandler: ((NSStackView) -> Void)?
override func mouseDragged(with event: NSEvent) {
guard self.isDraggingEnabled else {
@ -24,7 +24,7 @@ class DraggingSingleRowStackView: NSStackView {
let location = convert(event.locationInWindow, from: nil)
if let dragged = views.first(where: { $0.hitTest(location) != nil }) {
self.reorder(view: dragged, event: event)
self.postDraggingAction?(self)
self.postDraggingHandler?(self)
}
}

View File

@ -95,7 +95,7 @@ extension TabBar {
stack.autoPinEdge(toSuperviewEdge: .bottom)
stack.spacing = self._theme.tabSpacing
stack.postDraggingAction = { stackView in
stack.postDraggingHandler = { stackView in
let endIndex = stackView.arrangedSubviews.endIndex - 1
stackView.arrangedSubviews.enumerated().forEach { index, view in
guard let tab = view as? Tab<Entry> else { return }