ctlIME // +alwaysShowTooltipTextsHorizontally.

This commit is contained in:
ShikiSuen 2022-09-09 12:50:50 +08:00
parent 366bf9da2a
commit 624ada4294
1 changed files with 8 additions and 9 deletions

View File

@ -32,16 +32,15 @@ extension ctlInputMethod {
finalOrigin = NSPoint(
x: lineHeightRect.origin.x + lineHeightRect.size.width + 5, y: lineHeightRect.origin.y
)
ctlInputMethod.tooltipInstance.show(
tooltip: tooltip, at: finalOrigin,
bottomOutOfScreenAdjustmentHeight: delta, direction: .vertical
)
} else {
ctlInputMethod.tooltipInstance.show(
tooltip: tooltip, at: finalOrigin,
bottomOutOfScreenAdjustmentHeight: delta, direction: .horizontal
)
}
var tooltipContentDirection: NSAttributedTextView.writingDirection = {
if mgrPrefs.alwaysShowTooltipTextsHorizontally { return .horizontal }
return isVerticalTyping ? .vertical : .horizontal
}()
ctlInputMethod.tooltipInstance.show(
tooltip: tooltip, at: finalOrigin,
bottomOutOfScreenAdjustmentHeight: delta, direction: tooltipContentDirection
)
}
func show(candidateWindowWith state: IMEStateProtocol) {