PrefUI // +Hotkey switch for currency numerals.

This commit is contained in:
ShikiSuen 2022-07-26 19:34:42 +08:00
parent bd343df4f2
commit 6c0bc5838e
1 changed files with 9 additions and 0 deletions

View File

@ -37,6 +37,8 @@ struct suiPrefPaneKeyboard: View {
@State private var selUsingHotKeyJIS = UserDefaults.standard.bool(forKey: UserDef.kUsingHotKeyJIS)
@State private var selUsingHotKeyHalfWidthASCII = UserDefaults.standard.bool(
forKey: UserDef.kUsingHotKeyHalfWidthASCII)
@State private var selUsingHotKeyCurrencyNumerals = UserDefaults.standard.bool(
forKey: UserDef.kUsingHotKeyCurrencyNumerals)
private let contentWidth: Double = {
switch mgrPrefs.appleLanguages[0] {
@ -174,6 +176,13 @@ struct suiPrefPaneKeyboard: View {
mgrPrefs.usingHotKeyHalfWidthASCII = value
selUsingHotKeyHalfWidthASCII = value
}
Toggle(
LocalizedStringKey("Currency Numeral Output"),
isOn: $selUsingHotKeyCurrencyNumerals
).onChange(of: selUsingHotKeyCurrencyNumerals) { value in
mgrPrefs.usingHotKeyCurrencyNumerals = value
selUsingHotKeyCurrencyNumerals = value
}
}
}
Divider()