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,6 +19,7 @@ extension PrefUITabs {
struct VwrPrefPage: View { struct VwrPrefPage: View {
@State var tabType: PrefUITabs @State var tabType: PrefUITabs
var body: some View { var body: some View {
Group {
switch tabType { switch tabType {
case .tabGeneral: VwrPrefPaneGeneral() case .tabGeneral: VwrPrefPaneGeneral()
case .tabCandidates: VwrPrefPaneCandidates() case .tabCandidates: VwrPrefPaneCandidates()
@ -30,6 +31,7 @@ struct VwrPrefPage: View {
case .tabKeyboard: VwrPrefPaneKeyboard() case .tabKeyboard: VwrPrefPaneKeyboard()
case .tabDevZone, .tabExperience: VwrPrefPaneDevZone() case .tabDevZone, .tabExperience: VwrPrefPaneDevZone()
} }
}.fixedSize()
} }
} }

View File

@ -37,8 +37,8 @@ struct VwrPrefPaneGeneral: View {
var body: some View { var body: some View {
ScrollView { ScrollView {
VStack { SSPreferences.Container(contentWidth: CtlPrefUI.contentWidth) {
_VSpacer(minHeight: 24) SSPreferences.Section(title: "") {
Text( Text(
"\u{2022} " "\u{2022} "
+ NSLocalizedString( + NSLocalizedString(
@ -50,10 +50,8 @@ struct VwrPrefPaneGeneral: View {
comment: "" comment: ""
) )
) )
.preferenceDescription() .preferenceDescription().prefDescriptionWidthLimited()
.fixedSize(horizontal: false, vertical: true) }
}.frame(maxWidth: CtlPrefUI.contentWidth)
SSPreferences.Container(contentWidth: CtlPrefUI.contentWidth) {
SSPreferences.Section(label: { Text(LocalizedStringKey("UI Language:")) }) { SSPreferences.Section(label: { Text(LocalizedStringKey("UI Language:")) }) {
Picker( Picker(
LocalizedStringKey("Follow OS settings"), LocalizedStringKey("Follow OS settings"),