SessionCtl // Bind candidateWindowShowOnlyOneLine, etc.
- Also unseal reverse lookups to all conditions.
This commit is contained in:
parent
2bfad15422
commit
777870a1d3
|
@ -79,9 +79,7 @@ extension SessionCtl: CtlCandidateDelegate {
|
|||
&& !clientBundleIdentifier.contains("com.raycast.macos")
|
||||
}
|
||||
|
||||
public var showReverseLookupResult: Bool {
|
||||
!isVerticalTyping && PrefMgr.shared.showReverseLookupInCandidateUI
|
||||
}
|
||||
public var showReverseLookupResult: Bool { PrefMgr.shared.showReverseLookupInCandidateUI }
|
||||
|
||||
@discardableResult public func reverseLookup(for value: String) -> [String] {
|
||||
let blankResult: [String] = []
|
||||
|
|
|
@ -91,7 +91,8 @@ public extension SessionCtl {
|
|||
PrefMgr.shared.useIMKCandidateWindow
|
||||
? CtlCandidateIMK(candidateLayout) : CtlCandidateTDK(candidateLayout)
|
||||
if let candidateTDK = candidateUI as? CtlCandidateTDK {
|
||||
candidateTDK.maxLinesPerPage = isVerticalTyping ? 1 : 4
|
||||
let singleLine = isVerticalTyping || PrefMgr.shared.candidateWindowShowOnlyOneLine
|
||||
candidateTDK.maxLinesPerPage = singleLine ? 1 : 4
|
||||
}
|
||||
} else {
|
||||
candidateUI = CtlCandidateTDK(candidateLayout)
|
||||
|
@ -101,14 +102,16 @@ public extension SessionCtl {
|
|||
name: PrefMgr.shared.candidateTextFontName, size: PrefMgr.shared.candidateListTextSize
|
||||
)
|
||||
|
||||
let singleColumn = isVerticalTyping || PrefMgr.shared.candidateWindowShowOnlyOneLine
|
||||
|
||||
if PrefMgr.shared.cassetteEnabled {
|
||||
candidateUI?.tooltip =
|
||||
isVerticalTyping ? "📼" : "📼 " + NSLocalizedString("CIN Cassette Mode", comment: "")
|
||||
singleColumn ? "📼" : "📼 " + NSLocalizedString("CIN Cassette Mode", comment: "")
|
||||
}
|
||||
|
||||
if state.type == .ofAssociates {
|
||||
candidateUI?.tooltip =
|
||||
isVerticalTyping ? "⇧" : NSLocalizedString("Hold ⇧ to choose associates.", comment: "")
|
||||
singleColumn ? "⇧" : NSLocalizedString("Hold ⇧ to choose associates.", comment: "")
|
||||
}
|
||||
|
||||
candidateUI?.useLangIdentifier = PrefMgr.shared.legacyCandidateViewTypesettingMethodEnabled
|
||||
|
|
Loading…
Reference in New Issue