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")
|
&& !clientBundleIdentifier.contains("com.raycast.macos")
|
||||||
}
|
}
|
||||||
|
|
||||||
public var showReverseLookupResult: Bool {
|
public var showReverseLookupResult: Bool { PrefMgr.shared.showReverseLookupInCandidateUI }
|
||||||
!isVerticalTyping && PrefMgr.shared.showReverseLookupInCandidateUI
|
|
||||||
}
|
|
||||||
|
|
||||||
@discardableResult public func reverseLookup(for value: String) -> [String] {
|
@discardableResult public func reverseLookup(for value: String) -> [String] {
|
||||||
let blankResult: [String] = []
|
let blankResult: [String] = []
|
||||||
|
|
|
@ -91,7 +91,8 @@ public extension SessionCtl {
|
||||||
PrefMgr.shared.useIMKCandidateWindow
|
PrefMgr.shared.useIMKCandidateWindow
|
||||||
? CtlCandidateIMK(candidateLayout) : CtlCandidateTDK(candidateLayout)
|
? CtlCandidateIMK(candidateLayout) : CtlCandidateTDK(candidateLayout)
|
||||||
if let candidateTDK = candidateUI as? CtlCandidateTDK {
|
if let candidateTDK = candidateUI as? CtlCandidateTDK {
|
||||||
candidateTDK.maxLinesPerPage = isVerticalTyping ? 1 : 4
|
let singleLine = isVerticalTyping || PrefMgr.shared.candidateWindowShowOnlyOneLine
|
||||||
|
candidateTDK.maxLinesPerPage = singleLine ? 1 : 4
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
candidateUI = CtlCandidateTDK(candidateLayout)
|
candidateUI = CtlCandidateTDK(candidateLayout)
|
||||||
|
@ -101,14 +102,16 @@ public extension SessionCtl {
|
||||||
name: PrefMgr.shared.candidateTextFontName, size: PrefMgr.shared.candidateListTextSize
|
name: PrefMgr.shared.candidateTextFontName, size: PrefMgr.shared.candidateListTextSize
|
||||||
)
|
)
|
||||||
|
|
||||||
|
let singleColumn = isVerticalTyping || PrefMgr.shared.candidateWindowShowOnlyOneLine
|
||||||
|
|
||||||
if PrefMgr.shared.cassetteEnabled {
|
if PrefMgr.shared.cassetteEnabled {
|
||||||
candidateUI?.tooltip =
|
candidateUI?.tooltip =
|
||||||
isVerticalTyping ? "📼" : "📼 " + NSLocalizedString("CIN Cassette Mode", comment: "")
|
singleColumn ? "📼" : "📼 " + NSLocalizedString("CIN Cassette Mode", comment: "")
|
||||||
}
|
}
|
||||||
|
|
||||||
if state.type == .ofAssociates {
|
if state.type == .ofAssociates {
|
||||||
candidateUI?.tooltip =
|
candidateUI?.tooltip =
|
||||||
isVerticalTyping ? "⇧" : NSLocalizedString("Hold ⇧ to choose associates.", comment: "")
|
singleColumn ? "⇧" : NSLocalizedString("Hold ⇧ to choose associates.", comment: "")
|
||||||
}
|
}
|
||||||
|
|
||||||
candidateUI?.useLangIdentifier = PrefMgr.shared.legacyCandidateViewTypesettingMethodEnabled
|
candidateUI?.useLangIdentifier = PrefMgr.shared.legacyCandidateViewTypesettingMethodEnabled
|
||||||
|
|
Loading…
Reference in New Issue