PrefUI // Fix tab page height problems.

This commit is contained in:
ShikiSuen 2023-02-19 22:56:04 +08:00
parent 35edeaf6e0
commit 4e9faa70c5
2 changed files with 27 additions and 27 deletions

View File

@ -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()
}
}

View File

@ -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"),