ctlTooltip // Disable vertical display on macOS 10.11 and 10.12.
- These versions of macOS don't draw NSAttributedStrings well.
This commit is contained in:
parent
624ada4294
commit
23b5428383
|
@ -33,7 +33,7 @@ extension ctlInputMethod {
|
|||
x: lineHeightRect.origin.x + lineHeightRect.size.width + 5, y: lineHeightRect.origin.y
|
||||
)
|
||||
}
|
||||
var tooltipContentDirection: NSAttributedTextView.writingDirection = {
|
||||
let tooltipContentDirection: NSAttributedTextView.writingDirection = {
|
||||
if mgrPrefs.alwaysShowTooltipTextsHorizontally { return .horizontal }
|
||||
return isVerticalTyping ? .vertical : .horizontal
|
||||
}()
|
||||
|
|
|
@ -28,6 +28,7 @@ public class ctlTooltip: NSWindowController {
|
|||
|
||||
public var direction: NSAttributedTextView.writingDirection = .horizontal {
|
||||
didSet {
|
||||
if #unavailable(macOS 10.13) { direction = .horizontal }
|
||||
messageText.direction = direction
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +60,6 @@ public class ctlTooltip: NSWindowController {
|
|||
direction: NSAttributedTextView.writingDirection = .horizontal
|
||||
) {
|
||||
self.direction = direction
|
||||
messageText.direction = self.direction
|
||||
self.tooltip = tooltip
|
||||
window?.orderFront(nil)
|
||||
set(windowTopLeftPoint: point, bottomOutOfScreenAdjustmentHeight: heightDelta)
|
||||
|
|
Loading…
Reference in New Issue