PrefUI // Only enable .langIdentifier for macOS 12 and later.

This commit is contained in:
ShikiSuen 2022-08-21 23:20:59 +08:00
parent 6fc27788ed
commit ecd2fe7403
1 changed files with 8 additions and 0 deletions

View File

@ -33,6 +33,13 @@ struct suiPrefPaneDevZone: View {
}
}()
var isMontereyOrAbove: Bool = {
if #available(macOS 12.0, *) {
return true
}
return false
}()
var body: some View {
ScrollView {
Preferences.Container(contentWidth: contentWidth) {
@ -77,6 +84,7 @@ struct suiPrefPaneDevZone: View {
)
)
.preferenceDescription().fixedSize(horizontal: false, vertical: true)
.disabled(!isMontereyOrAbove)
Toggle(
LocalizedStringKey("Use Shift Key Accommodation in all cases"),
isOn: $selShouldAlwaysUseShiftKeyAccommodation.onChange {