CtlCandidateTDK // Reset window origin on updateDisplay().
This commit is contained in:
parent
20368fcd91
commit
e5c7505bdd
|
@ -106,6 +106,11 @@ public class CtlCandidateTDK: CtlCandidate, NSWindowDelegate {
|
|||
}
|
||||
delegate?.candidatePairHighlightChanged(at: highlightedIndex)
|
||||
DispatchQueue.main.async { [self] in
|
||||
updateNSWindowModern(window)
|
||||
}
|
||||
}
|
||||
|
||||
func updateNSWindowModern(_ window: NSWindow) {
|
||||
window.isOpaque = false
|
||||
window.backgroundColor = .clear
|
||||
viewCheck: do {
|
||||
|
@ -119,7 +124,7 @@ public class CtlCandidateTDK: CtlCandidate, NSWindowDelegate {
|
|||
}
|
||||
window.contentView = Self.currentView
|
||||
window.setContentSize(Self.currentView.fittingSize)
|
||||
}
|
||||
delegate?.resetCandidateWindowOrigin()
|
||||
}
|
||||
|
||||
func updateNSWindowLegacy(_ window: NSWindow) {
|
||||
|
@ -139,6 +144,7 @@ public class CtlCandidateTDK: CtlCandidate, NSWindowDelegate {
|
|||
Self.currentView.addSubview(viewToDraw)
|
||||
window.contentView = Self.currentView
|
||||
window.setContentSize(outerSize)
|
||||
delegate?.resetCandidateWindowOrigin()
|
||||
}
|
||||
|
||||
override public func scrollWheel(with event: NSEvent) {
|
||||
|
|
Loading…
Reference in New Issue