PrefUI // Bind alwaysExpandCandidateWindow().
This commit is contained in:
parent
cc6c8bcf29
commit
e19aa9e83a
|
@ -86,6 +86,10 @@ class CtlPrefUIShared {
|
|||
}
|
||||
}()
|
||||
|
||||
static var isCJKInterface: Bool {
|
||||
PrefMgr.shared.appleLanguages[0].contains("zh-Han") || PrefMgr.shared.appleLanguages[0] == "ja"
|
||||
}
|
||||
|
||||
static var containerWidth: Double { contentWidth + 60 }
|
||||
static var maxDescriptionWidth: Double { contentWidth * 0.8 }
|
||||
}
|
||||
|
|
|
@ -26,6 +26,9 @@ struct VwrPrefPaneCandidates: View {
|
|||
@Backport.AppStorage(wrappedValue: false, UserDef.kCandidateWindowShowOnlyOneLine.rawValue)
|
||||
private var candidateWindowShowOnlyOneLine: Bool
|
||||
|
||||
@Backport.AppStorage(wrappedValue: false, UserDef.kAlwaysExpandCandidateWindow.rawValue)
|
||||
private var alwaysExpandCandidateWindow: Bool
|
||||
|
||||
@Backport.AppStorage(wrappedValue: true, UserDef.kShowReverseLookupInCandidateUI.rawValue)
|
||||
private var showReverseLookupInCandidateUI: Bool
|
||||
|
||||
|
@ -71,15 +74,29 @@ struct VwrPrefPaneCandidates: View {
|
|||
.pickerStyle(RadioGroupPickerStyle())
|
||||
Text(LocalizedStringKey("Choose your preferred layout of the candidate window."))
|
||||
.preferenceDescription(maxWidth: CtlPrefUIShared.maxDescriptionWidth)
|
||||
Toggle(
|
||||
LocalizedStringKey("Use only one row / column in candidate window."),
|
||||
isOn: $candidateWindowShowOnlyOneLine
|
||||
)
|
||||
.controlSize(.small)
|
||||
let candidateLayoutSubOptions = Group {
|
||||
Toggle(
|
||||
LocalizedStringKey("Use only one row / column in candidate window"),
|
||||
isOn: $candidateWindowShowOnlyOneLine
|
||||
)
|
||||
.controlSize(.small)
|
||||
Toggle(
|
||||
LocalizedStringKey("Always expand candidate window panel"),
|
||||
isOn: $alwaysExpandCandidateWindow
|
||||
)
|
||||
.controlSize(.small).disabled(candidateWindowShowOnlyOneLine)
|
||||
}
|
||||
if CtlPrefUIShared.isCJKInterface {
|
||||
HStack {
|
||||
candidateLayoutSubOptions
|
||||
}
|
||||
} else {
|
||||
VStack(alignment: .leading) {
|
||||
candidateLayoutSubOptions
|
||||
}
|
||||
}
|
||||
Text(
|
||||
"This only works with Tadokoro candidate window.".localized
|
||||
+ CtlPrefUIShared.sentenceSeparator
|
||||
+ "Tadokoro candidate window shows 4 rows / columns by default, providing similar experiences from Microsoft New Phonetic IME and macOS bult-in Chinese IME (since macOS 10.9). However, for some users who have presbyopia, they prefer giant candidate font sizes, resulting a concern that multiple rows / columns of candidates can make the candidate window looks too big, hence this option. Note that this option will be dismissed if the typing context is vertical, forcing the candidates to be shown in only one row / column. Only one reverse-lookup result can be made available in single row / column mode due to reduced candidate window size.".localized
|
||||
"Tadokoro candidate window shows 4 rows / columns by default, providing similar experiences from Microsoft New Phonetic IME and macOS bult-in Chinese IME (since macOS 10.9). However, for some users who have presbyopia, they prefer giant candidate font sizes, resulting a concern that multiple rows / columns of candidates can make the candidate window looks too big, hence this option. Note that this option will be dismissed if the typing context is vertical, forcing the candidates to be shown in only one row / column. Only one reverse-lookup result can be made available in single row / column mode due to reduced candidate window size.".localized
|
||||
)
|
||||
.preferenceDescription(maxWidth: CtlPrefUIShared.maxDescriptionWidth)
|
||||
}
|
||||
|
|
|
@ -209,6 +209,7 @@
|
|||
"Always directly commit lowercased letters" = "Always directly commit lowercased letters";
|
||||
"Always directly commit uppercased letters" = "Always directly commit uppercased letters";
|
||||
"Always drop the previous reading" = "Always drop the previous reading";
|
||||
"Always expand candidate window panel" = "Always expand candidate window panel";
|
||||
"Always show tooltip texts horizontally" = "Always show tooltip texts horizontally";
|
||||
"Always type intonations to the inline composition buffer" = "Always type intonations to the inline composition buffer";
|
||||
"Always use fixed listing order in candidate window" = "Always use fixed listing order in candidate window";
|
||||
|
@ -354,7 +355,7 @@
|
|||
"UI Language:" = "UI Language:";
|
||||
"Universal Pinyin with Numeral Intonation" = "Universal Pinyin with Numeral Intonation";
|
||||
"Use ESC key to clear the entire input buffer" = "Use ESC key to clear the entire input buffer";
|
||||
"Use only one row / column in candidate window." = "Use only one row / column in candidate window.";
|
||||
"Use only one row / column in candidate window" = "Use only one row / column in candidate window";
|
||||
"Use Space to confirm highlighted candidate in Per-Char Select Mode" = "Use Space to confirm highlighted candidate in Per-Char Select Mode";
|
||||
"Vertical" = "Vertical";
|
||||
"Warning: This page is for testing future features. \nFeatures listed here may not work as expected." = "Warning: This page is for testing future features. \nFeatures listed here may not work as expected.";
|
||||
|
|
|
@ -209,6 +209,7 @@
|
|||
"Always directly commit lowercased letters" = "Always directly commit lowercased letters";
|
||||
"Always directly commit uppercased letters" = "Always directly commit uppercased letters";
|
||||
"Always drop the previous reading" = "Always drop the previous reading";
|
||||
"Always expand candidate window panel" = "Always expand candidate window panel";
|
||||
"Always show tooltip texts horizontally" = "Always show tooltip texts horizontally";
|
||||
"Always type intonations to the inline composition buffer" = "Always type intonations to the inline composition buffer";
|
||||
"Always use fixed listing order in candidate window" = "Always use fixed listing order in candidate window";
|
||||
|
@ -354,7 +355,7 @@
|
|||
"UI Language:" = "UI Language:";
|
||||
"Universal Pinyin with Numeral Intonation" = "Universal Pinyin with Numeral Intonation";
|
||||
"Use ESC key to clear the entire input buffer" = "Use ESC key to clear the entire input buffer";
|
||||
"Use only one row / column in candidate window." = "Use only one row / column in candidate window.";
|
||||
"Use only one row / column in candidate window" = "Use only one row / column in candidate window";
|
||||
"Use Space to confirm highlighted candidate in Per-Char Select Mode" = "Use Space to confirm highlighted candidate in Per-Char Select Mode";
|
||||
"Vertical" = "Vertical";
|
||||
"Warning: This page is for testing future features. \nFeatures listed here may not work as expected." = "Warning: This page is for testing future features. \nFeatures listed here may not work as expected.";
|
||||
|
|
|
@ -210,6 +210,7 @@
|
|||
"Always directly commit lowercased letters" = "いつでもローマ字(小文字)を直接出力";
|
||||
"Always directly commit uppercased letters" = "いつでもローマ字(大文字)を直接出力";
|
||||
"Always drop the previous reading" = "カーソルの後部の音読みを常に削除する";
|
||||
"Always expand candidate window panel" = "文字候補ウィンドウを折り畳みせずに";
|
||||
"Always show tooltip texts horizontally" = "ヒントを常に横書きにする";
|
||||
"Always type intonations to the inline composition buffer" = "常に入力緩衝列に音調を入力する";
|
||||
"Always use fixed listing order in candidate window" = "候補文字を固定順番で陳列する";
|
||||
|
@ -355,7 +356,7 @@
|
|||
"UI Language:" = "表示用言語:";
|
||||
"Universal Pinyin with Numeral Intonation" = "汎用弁音 (ローマ字+数字音調)";
|
||||
"Use ESC key to clear the entire input buffer" = "ESC キーで入力緩衝列を消す";
|
||||
"Use only one row / column in candidate window." = "ただ1つ行・列で文字候補を陳列。";
|
||||
"Use only one row / column in candidate window" = "ただ1つ行・列で文字候補を陳列";
|
||||
"Use Space to confirm highlighted candidate in Per-Char Select Mode" = "全候補入力の場合、ハイライト候補を Space キーで確認";
|
||||
"Vertical" = "縦型陳列";
|
||||
"Warning: This page is for testing future features. \nFeatures listed here may not work as expected." = "警告:これからの新機能テストのために作ったページですから、\nここで陳列されている諸機能は予想通り動けるだと思わないでください。";
|
||||
|
|
|
@ -209,6 +209,7 @@
|
|||
"Always directly commit lowercased letters" = "始终直接递交小写字母";
|
||||
"Always directly commit uppercased letters" = "始终直接递交大写字母";
|
||||
"Always drop the previous reading" = "始终剔除游标正后方的字音";
|
||||
"Always expand candidate window panel" = "始终自动展开多行选字窗";
|
||||
"Always show tooltip texts horizontally" = "始终使用横排来显示工具提示视窗";
|
||||
"Always type intonations to the inline composition buffer" = "始终在内文组字区内键入声调符号";
|
||||
"Always use fixed listing order in candidate window" = "以固定顺序来陈列选字窗内的候选字";
|
||||
|
@ -354,7 +355,7 @@
|
|||
"UI Language:" = "介面语言:";
|
||||
"Universal Pinyin with Numeral Intonation" = "通用拼音+数字标调";
|
||||
"Use ESC key to clear the entire input buffer" = "敲 ESC 键以清空整个组字缓冲区";
|
||||
"Use only one row / column in candidate window." = "仅以单行/单列来陈列候选字。";
|
||||
"Use only one row / column in candidate window" = "仅以单行/单列来陈列候选字";
|
||||
"Use Space to confirm highlighted candidate in Per-Char Select Mode" = "在逐字选字模式当中使用空格键确认当前高亮候选字";
|
||||
"Vertical" = "纵向布局";
|
||||
"Warning: This page is for testing future features. \nFeatures listed here may not work as expected." = "警告:该页面仅作未来功能测试所用。\n在此列出的功能并非处于完全可用之状态。";
|
||||
|
|
|
@ -209,6 +209,7 @@
|
|||
"Always directly commit lowercased letters" = "始終直接遞交小寫字母";
|
||||
"Always directly commit uppercased letters" = "始終直接遞交大寫字母";
|
||||
"Always drop the previous reading" = "始終剔除游標正後方的字音";
|
||||
"Always expand candidate window panel" = "始終自動展開多行選字窗";
|
||||
"Always show tooltip texts horizontally" = "始終使用橫排來顯示工具提示視窗";
|
||||
"Always type intonations to the inline composition buffer" = "始終在內文組字區內鍵入聲調符號";
|
||||
"Always use fixed listing order in candidate window" = "以固定順序來陳列選字窗內的候選字";
|
||||
|
@ -354,7 +355,7 @@
|
|||
"UI Language:" = "介面語言:";
|
||||
"Universal Pinyin with Numeral Intonation" = "通用拼音+數字標調";
|
||||
"Use ESC key to clear the entire input buffer" = "敲 ESC 鍵以清空整個組字緩衝區";
|
||||
"Use only one row / column in candidate window." = "僅以單行/單列來陳列候選字。";
|
||||
"Use only one row / column in candidate window" = "僅以單行/單列來陳列候選字";
|
||||
"Use Space to confirm highlighted candidate in Per-Char Select Mode" = "在逐字選字模式當中使用空格鍵確認當前高亮候選字";
|
||||
"Vertical" = "縱向佈局";
|
||||
"Warning: This page is for testing future features. \nFeatures listed here may not work as expected." = "警告:該頁面僅作未來功能測試所用。\n在此列出的功能並非處於完全可用之狀態。";
|
||||
|
|
Loading…
Reference in New Issue