From 4e9faa70c5bcf8ef6f3fc355118d0af2ebbb791c Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 19 Feb 2023 22:56:04 +0800 Subject: [PATCH] PrefUI // Fix tab page height problems. --- .../Modules/UIModules/PrefUI/CtlPrefUI.swift | 24 ++++++++------- .../UIModules/PrefUI/VwrPrefPaneGeneral.swift | 30 +++++++++---------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift b/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift index 753e6e5d..b1451376 100644 --- a/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift +++ b/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift @@ -19,17 +19,19 @@ extension PrefUITabs { struct VwrPrefPage: View { @State var tabType: PrefUITabs var body: some View { - switch tabType { - case .tabGeneral: VwrPrefPaneGeneral() - case .tabCandidates: VwrPrefPaneCandidates() - case .tabBehavior: VwrPrefPaneBehavior() - case .tabOutput: VwrPrefPaneOutput() - case .tabDictionary: VwrPrefPaneDictionary() - case .tabPhrases: VwrPrefPanePhrases() - case .tabCassette: VwrPrefPaneCassette() - case .tabKeyboard: VwrPrefPaneKeyboard() - case .tabDevZone, .tabExperience: VwrPrefPaneDevZone() - } + Group { + switch tabType { + case .tabGeneral: VwrPrefPaneGeneral() + case .tabCandidates: VwrPrefPaneCandidates() + case .tabBehavior: VwrPrefPaneBehavior() + case .tabOutput: VwrPrefPaneOutput() + case .tabDictionary: VwrPrefPaneDictionary() + case .tabPhrases: VwrPrefPanePhrases() + case .tabCassette: VwrPrefPaneCassette() + case .tabKeyboard: VwrPrefPaneKeyboard() + case .tabDevZone, .tabExperience: VwrPrefPaneDevZone() + } + }.fixedSize() } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift index fb7331d2..273a50bb 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift @@ -37,23 +37,21 @@ struct VwrPrefPaneGeneral: View { var body: some View { ScrollView { - VStack { - _VSpacer(minHeight: 24) - Text( - "\u{2022} " - + NSLocalizedString( - "Please use mouse wheel to scroll each page if needed. The CheatSheet is available in the IME menu.", - comment: "" - ) + "\n\u{2022} " - + NSLocalizedString( - "Note: The “Delete ⌫” key on Mac keyboard is named as “BackSpace ⌫” here in order to distinguish the real “Delete ⌦” key from full-sized desktop keyboards. If you want to use the real “Delete ⌦” key on a Mac keyboard with no numpad equipped, you have to press “Fn+⌫” instead.", - comment: "" - ) - ) - .preferenceDescription() - .fixedSize(horizontal: false, vertical: true) - }.frame(maxWidth: CtlPrefUI.contentWidth) SSPreferences.Container(contentWidth: CtlPrefUI.contentWidth) { + SSPreferences.Section(title: "") { + Text( + "\u{2022} " + + NSLocalizedString( + "Please use mouse wheel to scroll each page if needed. The CheatSheet is available in the IME menu.", + comment: "" + ) + "\n\u{2022} " + + NSLocalizedString( + "Note: The “Delete ⌫” key on Mac keyboard is named as “BackSpace ⌫” here in order to distinguish the real “Delete ⌦” key from full-sized desktop keyboards. If you want to use the real “Delete ⌦” key on a Mac keyboard with no numpad equipped, you have to press “Fn+⌫” instead.", + comment: "" + ) + ) + .preferenceDescription().prefDescriptionWidthLimited() + } SSPreferences.Section(label: { Text(LocalizedStringKey("UI Language:")) }) { Picker( LocalizedStringKey("Follow OS settings"),