ctlIME // +useIMKCandidateWindow.
This commit is contained in:
parent
ba054059e8
commit
fdad75434e
|
@ -25,7 +25,8 @@ class ctlInputMethod: IMKInputController {
|
||||||
static var areWeNerfing = false
|
static var areWeNerfing = false
|
||||||
|
|
||||||
/// 目前在用的的選字窗副本。
|
/// 目前在用的的選字窗副本。
|
||||||
static var ctlCandidateCurrent: ctlCandidateProtocol = ctlCandidateIMK.init(.horizontal)
|
static var ctlCandidateCurrent: ctlCandidateProtocol =
|
||||||
|
mgrPrefs.useIMKCandidateWindow ? ctlCandidateIMK.init(.horizontal) : ctlCandidateUniversal.init(.horizontal)
|
||||||
|
|
||||||
/// 工具提示視窗的副本。
|
/// 工具提示視窗的副本。
|
||||||
static let tooltipController = TooltipController()
|
static let tooltipController = TooltipController()
|
||||||
|
|
|
@ -66,13 +66,14 @@ extension ctlInputMethod {
|
||||||
/// layoutCandidateView 在這裡無法起到糾正作用。
|
/// layoutCandidateView 在這裡無法起到糾正作用。
|
||||||
/// 該問題徹底解決的價值並不大,直接等到 macOS 10.x 全線淘汰之後用 SwiftUI 重寫選字窗吧。
|
/// 該問題徹底解決的價值並不大,直接等到 macOS 10.x 全線淘汰之後用 SwiftUI 重寫選字窗吧。
|
||||||
|
|
||||||
if isCandidateWindowVertical { // 縱排輸入時強制使用縱排選字窗
|
let candidateLayout: CandidateLayout =
|
||||||
ctlInputMethod.ctlCandidateCurrent = ctlCandidateIMK.init(.vertical)
|
((isCandidateWindowVertical || !mgrPrefs.useHorizontalCandidateList)
|
||||||
} else if mgrPrefs.useHorizontalCandidateList {
|
? CandidateLayout.vertical
|
||||||
ctlInputMethod.ctlCandidateCurrent = ctlCandidateIMK.init(.horizontal)
|
: CandidateLayout.horizontal)
|
||||||
} else {
|
|
||||||
ctlInputMethod.ctlCandidateCurrent = ctlCandidateIMK.init(.vertical)
|
ctlInputMethod.ctlCandidateCurrent =
|
||||||
}
|
mgrPrefs.useIMKCandidateWindow
|
||||||
|
? ctlCandidateIMK.init(candidateLayout) : ctlCandidateUniversal.init(candidateLayout)
|
||||||
|
|
||||||
// set the attributes for the candidate panel (which uses NSAttributedString)
|
// set the attributes for the candidate panel (which uses NSAttributedString)
|
||||||
let textSize = mgrPrefs.candidateListTextSize
|
let textSize = mgrPrefs.candidateListTextSize
|
||||||
|
|
Loading…
Reference in New Issue