PrefUI // Make tab pages scrollable if too large.
This commit is contained in:
parent
4af7ad6c9d
commit
c5740fb204
|
@ -16,6 +16,8 @@ struct suiPrefPaneDevZone: View {
|
||||||
forKey: UserDef.kHandleDefaultCandidateFontsByLangIdentifier.rawValue)
|
forKey: UserDef.kHandleDefaultCandidateFontsByLangIdentifier.rawValue)
|
||||||
@State private var selShouldAlwaysUseShiftKeyAccommodation: Bool = UserDefaults.standard.bool(
|
@State private var selShouldAlwaysUseShiftKeyAccommodation: Bool = UserDefaults.standard.bool(
|
||||||
forKey: UserDef.kShouldAlwaysUseShiftKeyAccommodation.rawValue)
|
forKey: UserDef.kShouldAlwaysUseShiftKeyAccommodation.rawValue)
|
||||||
|
|
||||||
|
private let contentMaxHeight: Double = 430
|
||||||
private let contentWidth: Double = {
|
private let contentWidth: Double = {
|
||||||
switch mgrPrefs.appleLanguages[0] {
|
switch mgrPrefs.appleLanguages[0] {
|
||||||
case "ja":
|
case "ja":
|
||||||
|
@ -30,6 +32,7 @@ struct suiPrefPaneDevZone: View {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
ScrollView {
|
||||||
Preferences.Container(contentWidth: contentWidth) {
|
Preferences.Container(contentWidth: contentWidth) {
|
||||||
Preferences.Section(title: "", bottomDivider: true) {
|
Preferences.Section(title: "", bottomDivider: true) {
|
||||||
Text(
|
Text(
|
||||||
|
@ -72,6 +75,7 @@ struct suiPrefPaneDevZone: View {
|
||||||
.preferenceDescription().fixedSize(horizontal: false, vertical: true)
|
.preferenceDescription().fixedSize(horizontal: false, vertical: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}.frame(maxHeight: contentMaxHeight).fixedSize(horizontal: false, vertical: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@ struct suiPrefPaneDictionary: View {
|
||||||
forKey: UserDef.kFetchSuggestionsFromUserOverrideModel.rawValue)
|
forKey: UserDef.kFetchSuggestionsFromUserOverrideModel.rawValue)
|
||||||
@State private var selUseFixecCandidateOrderOnSelection: Bool = UserDefaults.standard.bool(
|
@State private var selUseFixecCandidateOrderOnSelection: Bool = UserDefaults.standard.bool(
|
||||||
forKey: UserDef.kUseFixecCandidateOrderOnSelection.rawValue)
|
forKey: UserDef.kUseFixecCandidateOrderOnSelection.rawValue)
|
||||||
|
|
||||||
|
private let contentMaxHeight: Double = 430
|
||||||
private let contentWidth: Double = {
|
private let contentWidth: Double = {
|
||||||
switch mgrPrefs.appleLanguages[0] {
|
switch mgrPrefs.appleLanguages[0] {
|
||||||
case "ja":
|
case "ja":
|
||||||
|
@ -39,6 +41,7 @@ struct suiPrefPaneDictionary: View {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
ScrollView {
|
||||||
Preferences.Container(contentWidth: contentWidth) {
|
Preferences.Container(contentWidth: contentWidth) {
|
||||||
Preferences.Section(title: "", bottomDivider: true) {
|
Preferences.Section(title: "", bottomDivider: true) {
|
||||||
Text(LocalizedStringKey("Choose your desired user data folder path. Will be omitted if invalid."))
|
Text(LocalizedStringKey("Choose your desired user data folder path. Will be omitted if invalid."))
|
||||||
|
@ -142,6 +145,7 @@ struct suiPrefPaneDictionary: View {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}.frame(maxHeight: contentMaxHeight).fixedSize(horizontal: false, vertical: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,8 @@ struct suiPrefPaneExperience: View {
|
||||||
forKey: UserDef.kUpperCaseLetterKeyBehavior.rawValue)
|
forKey: UserDef.kUpperCaseLetterKeyBehavior.rawValue)
|
||||||
@State private var selDisableShiftTogglingAlphanumericalMode: Bool = UserDefaults.standard.bool(
|
@State private var selDisableShiftTogglingAlphanumericalMode: Bool = UserDefaults.standard.bool(
|
||||||
forKey: UserDef.kDisableShiftTogglingAlphanumericalMode.rawValue)
|
forKey: UserDef.kDisableShiftTogglingAlphanumericalMode.rawValue)
|
||||||
|
|
||||||
|
private let contentMaxHeight: Double = 430
|
||||||
private let contentWidth: Double = {
|
private let contentWidth: Double = {
|
||||||
switch mgrPrefs.appleLanguages[0] {
|
switch mgrPrefs.appleLanguages[0] {
|
||||||
case "ja":
|
case "ja":
|
||||||
|
@ -52,6 +54,7 @@ struct suiPrefPaneExperience: View {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
ScrollView {
|
||||||
Preferences.Container(contentWidth: contentWidth) {
|
Preferences.Container(contentWidth: contentWidth) {
|
||||||
Preferences.Section(label: { Text(LocalizedStringKey("Cursor Selection:")) }) {
|
Preferences.Section(label: { Text(LocalizedStringKey("Cursor Selection:")) }) {
|
||||||
Picker(
|
Picker(
|
||||||
|
@ -174,6 +177,7 @@ struct suiPrefPaneExperience: View {
|
||||||
.preferenceDescription()
|
.preferenceDescription()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}.frame(maxHeight: contentMaxHeight).fixedSize(horizontal: false, vertical: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,8 @@ struct suiPrefPaneGeneral: View {
|
||||||
@State private var selEnableAutoUpdateCheck = UserDefaults.standard.bool(
|
@State private var selEnableAutoUpdateCheck = UserDefaults.standard.bool(
|
||||||
forKey: UserDef.kCheckUpdateAutomatically.rawValue)
|
forKey: UserDef.kCheckUpdateAutomatically.rawValue)
|
||||||
@State private var selEnableDebugMode = UserDefaults.standard.bool(forKey: UserDef.kIsDebugModeEnabled.rawValue)
|
@State private var selEnableDebugMode = UserDefaults.standard.bool(forKey: UserDef.kIsDebugModeEnabled.rawValue)
|
||||||
|
|
||||||
|
private let contentMaxHeight: Double = 430
|
||||||
private let contentWidth: Double = {
|
private let contentWidth: Double = {
|
||||||
switch mgrPrefs.appleLanguages[0] {
|
switch mgrPrefs.appleLanguages[0] {
|
||||||
case "ja":
|
case "ja":
|
||||||
|
@ -51,6 +53,7 @@ struct suiPrefPaneGeneral: View {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
ScrollView {
|
||||||
Preferences.Container(contentWidth: contentWidth) {
|
Preferences.Container(contentWidth: contentWidth) {
|
||||||
Preferences.Section(bottomDivider: false, label: { Text(LocalizedStringKey("Candidate Size:")) }) {
|
Preferences.Section(bottomDivider: false, label: { Text(LocalizedStringKey("Candidate Size:")) }) {
|
||||||
Picker(
|
Picker(
|
||||||
|
@ -180,6 +183,7 @@ struct suiPrefPaneGeneral: View {
|
||||||
.controlSize(.small)
|
.controlSize(.small)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}.frame(maxHeight: contentMaxHeight).fixedSize(horizontal: false, vertical: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ struct suiPrefPaneKeyboard: View {
|
||||||
@State private var selUsingHotKeyCurrencyNumerals = UserDefaults.standard.bool(
|
@State private var selUsingHotKeyCurrencyNumerals = UserDefaults.standard.bool(
|
||||||
forKey: UserDef.kUsingHotKeyCurrencyNumerals.rawValue)
|
forKey: UserDef.kUsingHotKeyCurrencyNumerals.rawValue)
|
||||||
|
|
||||||
|
private let contentMaxHeight: Double = 430
|
||||||
private let contentWidth: Double = {
|
private let contentWidth: Double = {
|
||||||
switch mgrPrefs.appleLanguages[0] {
|
switch mgrPrefs.appleLanguages[0] {
|
||||||
case "ja":
|
case "ja":
|
||||||
|
@ -42,6 +43,7 @@ struct suiPrefPaneKeyboard: View {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
ScrollView {
|
||||||
Preferences.Container(contentWidth: contentWidth) {
|
Preferences.Container(contentWidth: contentWidth) {
|
||||||
Preferences.Section(label: { Text(LocalizedStringKey("Selection Keys:")) }) {
|
Preferences.Section(label: { Text(LocalizedStringKey("Selection Keys:")) }) {
|
||||||
ComboBox(
|
ComboBox(
|
||||||
|
@ -228,6 +230,7 @@ struct suiPrefPaneKeyboard: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}.frame(maxHeight: contentMaxHeight).fixedSize(horizontal: false, vertical: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue